From cde1b96a94064063892460432a53daaedab4581a Mon Sep 17 00:00:00 2001 From: Dhawal Sanghvi Date: Thu, 20 Jun 2024 14:57:15 +0530 Subject: [PATCH] chore: add cluster id to pyroscope tags --- src/middleware.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/middleware.js b/src/middleware.js index 543b3af8d1..088c1dffeb 100644 --- a/src/middleware.js +++ b/src/middleware.js @@ -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, + isMaster: cluster.isMaster, + }, }); Pyroscope.startHeapCollecting(); }