Skip to content

Commit

Permalink
feat(grpc-sdk): add module instance id to loki logger (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Vol committed Jul 25, 2022
1 parent 531bbda commit cf38f85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/grpc-sdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ export default class ConduitGrpcSdk {
replaceTimestamp: true,
labels: {
module: this.name,
instance: this.name.startsWith('module_')
? this.name.substring(8)
: Crypto.randomBytes(16).toString('hex'),
},
}),
);
Expand Down

0 comments on commit cf38f85

Please sign in to comment.