Skip to content

Commit

Permalink
chore: add cluster id to pyroscope tags
Browse files Browse the repository at this point in the history
  • Loading branch information
dhawal1248 committed Jun 20, 2024
1 parent af02374 commit cde1b96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/middleware.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
const Pyroscope = require('@pyroscope/nodejs');
const { getDestTypeFromContext } = require('@rudderstack/integrations-lib');
const cluster = require('cluster');
const stats = require('./util/stats');

function initPyroscope() {
Pyroscope.init({
appName: 'rudder-transformer',
tags: {
workerId: cluster.worker ? cluster.worker.id : 0,

Check warning on line 10 in src/middleware.js

View check run for this annotation

Codecov / codecov/patch

src/middleware.js#L10

Added line #L10 was not covered by tests
isMaster: cluster.isMaster,
},
});
Pyroscope.startHeapCollecting();
}
Expand Down

0 comments on commit cde1b96

Please sign in to comment.