Skip to content

Commit

Permalink
Merge pull request #4242 from jeclrsg/feat-comms-wslogaccess-loki
Browse files Browse the repository at this point in the history
feat(comms): add support for the Grafana/Loki log engine
  • Loading branch information
GordonSmith authored Sep 23, 2024
2 parents 8600273 + 43b7403 commit 4f463ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/comms/src/services/wsLogaccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ export class LogaccessService extends LogaccessServiceBase {
const convertLogLine = (line: any) => {
const retVal: LogLine = {};
for (const key in columnMap) {
retVal[key] = line?.fields[0][columnMap[key]] ?? "";
if (line?.fields) {
retVal[key] = Object.assign({}, ...line.fields)[columnMap[key]] ?? "";
} else {
retVal[key] = "";
}
}
return retVal;
};
Expand Down Expand Up @@ -236,6 +240,7 @@ export class LogaccessService extends LogaccessServiceBase {
switch (logInfo.RemoteLogManagerType) {
case "azureloganalyticscurl":
case "elasticstack":
case "grafanacurl":
lines = logLines.lines?.map(convertLogLine) ?? [];
break;
default:
Expand Down

0 comments on commit 4f463ef

Please sign in to comment.