Skip to content

Commit

Permalink
Add process_id tag to profiles (#3911)
Browse files Browse the repository at this point in the history
Add a `process_id` that contains process pid to profiles.
  • Loading branch information
nsavoire authored Jan 2, 2024
1 parent 3bcdfbc commit 7bb99d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/dd-trace/src/profiling/exporters/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class AgentExporter {
['tags[]', 'language:javascript'],
['tags[]', 'runtime:nodejs'],
['tags[]', `runtime_version:${process.version}`],
['tags[]', `process_id:${process.pid}`],
['tags[]', `profiler_version:${version}`],
['tags[]', 'format:pprof'],
...Object.entries(tags).map(([key, value]) => ['tags[]', `${key}:${value}`])
Expand Down
2 changes: 2 additions & 0 deletions packages/dd-trace/test/profiling/exporters/agent.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('exporters/agent', function () {
'language:javascript',
'runtime:nodejs',
`runtime_version:${process.version}`,
`process_id:${process.pid}`,
`profiler_version:${version}`,
'format:pprof',
'runtime-id:a1b2c3d4-a1b2-a1b2-a1b2-a1b2c3d4e5f6'
Expand Down Expand Up @@ -359,6 +360,7 @@ describe('exporters/agent', function () {
'language:javascript',
'runtime:nodejs',
`runtime_version:${process.version}`,
`process_id:${process.pid}`,
`profiler_version:${version}`,
'format:pprof',
'foo:bar'
Expand Down

0 comments on commit 7bb99d1

Please sign in to comment.