Skip to content

Commit

Permalink
fix: loki labels (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 authored Jul 29, 2024
2 parents 7b87344 + a415ee1 commit 4356fef
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions api/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,10 @@ if (LOKI_URL && LOKI_USERNAME && LOKI_PASSWORD) {
const baseElements = basePath.split('/');

const labels = {
team: 'powerhouse',
application: 'switchboard',
env: LOKI_ENV ?? 'develop',
team: baseElements[2] ?? 'powerhouse',
application: baseElements[3] ?? 'switchboard',
env: LOKI_ENV ?? baseElements[1] ?? 'develop',
};
labels.env = baseElements[1] ?? 'develop';
labels.team = baseElements[2] ?? 'powerhouse';
labels.application = baseElements[3] ?? 'switchboard';

transportTargets.push({
target: 'pino-loki',
Expand Down

0 comments on commit 4356fef

Please sign in to comment.