Skip to content

add process tags to profiling#5072

Merged
wantsui merged 98 commits intomasterfrom
add-process-tags-to-profiling
Jan 20, 2026
Merged

add process tags to profiling#5072
wantsui merged 98 commits intomasterfrom
add-process-tags-to-profiling

Conversation

@wantsui
Copy link
Copy Markdown
Collaborator

@wantsui wantsui commented Nov 19, 2025

What does this PR do?

Implements AIDM-254, which is to add process tags to the profiling payloads when the experimental DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED is added. Note I don't think this should be in the changelog until we are more ready with this feature.

Requires DataDog/libdatadog#1359

Motivation:

AIDM-254

Change log entry

No.

Additional Notes:

When reviewing this, keep in mind that we need the implementations across tracers to be consistent:
Java PR: DataDog/dd-trace-java#8780
Python PR: DataDog/dd-trace-py#15226
.NET PR: DataDog/dd-trace-dotnet#7715

This PR is dependent on

Open Question(s):

  1. Is there a concept of a "root" payload in dd-trace-rb for profiling?

How to test the change?

I ran the integration/apps/ruby/app/fibonacci.rb script against a real Datadog Agent and can see the output of the tags in the profiles:

image

wantsui and others added 30 commits November 7, 2025 17:26
… This is still missing memoization and additional tests.
…he payload has the process tag only when the feature is enabled.
Co-authored-by: Marco Costa <marco.costa@datadoghq.com>
…uby conflict with sqlite and it is not needed for this test
Co-authored-by: Sergey Fedorov <oni.strech@gmail.com>
Co-authored-by: Sergey Fedorov <oni.strech@gmail.com>
@wantsui
Copy link
Copy Markdown
Collaborator Author

wantsui commented Jan 9, 2026

Note: The new libdatadog version with the profiling payload change is out: https://github.com/DataDog/libdatadog/releases/tag/v25.0.0, however I don't see it in the gems yet: https://rubygems.org/gems/libdatadog.

(I'm asking around to figure out steps are needed here).

@ivoanjo
Copy link
Copy Markdown
Member

ivoanjo commented Jan 9, 2026

@wantsui the magic is in https://github.com/DataDog/libdatadog/tree/main/ruby#releasing-a-new-version-to-rubygemsorg ! Lmk if you need any help :)

@wantsui wantsui changed the title feat: add process tags to profiling Add process tags to profiling Jan 15, 2026
@wantsui wantsui changed the title Add process tags to profiling add process tags to profiling Jan 15, 2026
@wantsui wantsui added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Jan 15, 2026
@datadog-official
Copy link
Copy Markdown

datadog-official bot commented Jan 15, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 81.25%
Overall Coverage: 95.20% (-0.01%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5efe2a2 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@wantsui wantsui marked this pull request as ready for review January 15, 2026 22:57
@wantsui wantsui requested review from a team as code owners January 15, 2026 22:57
Comment thread benchmarks/profiling_http_transport.rb Outdated
Copy link
Copy Markdown
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few notes, other than that it LGTM, great job implementing this end-to-end! 👍

Comment thread benchmarks/profiling_http_transport.rb
Comment thread lib/datadog/core/process_discovery.rb
Comment thread lib/datadog/profiling/exporter.rb Outdated
Comment thread lib/datadog/profiling/tag_builder.rb Outdated
Comment thread spec/datadog/profiling/flush_spec.rb Outdated
@ivoanjo
Copy link
Copy Markdown
Member

ivoanjo commented Jan 16, 2026

Also I don't usually suggest this, but looking at how small the current PR is AND how noisy the development history is -- consider squash merging this one? (If you don't have permissions, ping me and I can do it once you're ready)

Copy link
Copy Markdown
Member

@Strech Strech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼

Comment thread benchmarks/profiling_http_transport.rb Outdated
Comment thread spec/datadog/profiling/http_transport_spec.rb
@wantsui wantsui requested a review from ivoanjo January 16, 2026 20:55
Copy link
Copy Markdown
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for the small simplifications too, I really like the current diff

@wantsui wantsui merged commit 7f21164 into master Jan 20, 2026
637 checks passed
@wantsui wantsui deleted the add-process-tags-to-profiling branch January 20, 2026 16:02
@github-actions github-actions bot added this to the 2.27.0 milestone Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos core Involves Datadog core libraries profiling Involves Datadog profiling tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants