Skip to content

Add process tags and container id to process discovery#5336

Open
wantsui wants to merge 5 commits intomasterfrom
add-process-tags-container-id-process-discovery
Open

Add process tags and container id to process discovery#5336
wantsui wants to merge 5 commits intomasterfrom
add-process-tags-container-id-process-discovery

Conversation

@wantsui
Copy link
Collaborator

@wantsui wantsui commented Feb 9, 2026

What does this PR do?

Follows the Java implementation of adding process tags and container id for AIDM-279.

The java code is here:
https://github.com/DataDog/dd-trace-java/blob/master/dd-trace-core/src/main/java/datadog/trace/core/servicediscovery/ServiceDiscovery.java#L37-L38

              ProcessTags.getTagsForSerialization(),
              ContainerInfo.get().getContainerId());

Where process tags are comma separated: "a, b"

Motivation:

AIDM-279

Change log entry

Yes. Add process tags and container id to process discovery payloads when the experimental setting DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED=true is enabled.

Additional Notes:

How to test the change?

See AIDM-279 for screenshots of what it looks like on the Live Processes page.

@github-actions github-actions bot added the core Involves Datadog core libraries label Feb 9, 2026
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Thank you for updating Change log entry section 👏

Visited at: 2026-02-09 22:30:22 UTC

@datadog-official
Copy link

datadog-official bot commented Feb 9, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@wantsui wantsui marked this pull request as ready for review February 11, 2026 20:41
@wantsui wantsui requested a review from a team as a code owner February 11, 2026 20:41
@wantsui wantsui requested a review from marcotc February 11, 2026 20:44
@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 Feb 11, 2026
@wantsui wantsui requested a review from vandonr February 11, 2026 20:46
Copy link
Member

@p-datadog p-datadog left a comment

Choose a reason for hiding this comment

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

My reading of the diff is that there isn't integration test coverage for the functionality, and the tests in my opinion mock rather a lot of the relevant logic. I think the tests added here are good and valuable and should be retained but if the assessment is correct, adding an integration test would probably be useful as well (I have been using claude to create those lately).

@pr-commenter
Copy link

pr-commenter bot commented Feb 12, 2026

Benchmarks

Benchmark execution time: 2026-02-13 20:17:42

Comparing candidate commit 87ab619 in PR branch add-process-tags-container-id-process-discovery with baseline commit 1507cc7 in branch master.

Found 0 performance improvements and 1 performance regressions! Performance is the same for 43 metrics, 2 unstable metrics.

scenario:profiling - gvl benchmark samples

  • 🟥 throughput [-716.896op/s; -697.568op/s] or [-5.415%; -5.269%]

Comment on lines 169 to 181
it 'includes process tags' do
Datadog.configure do |c|
c.service = 'test-service'
c.experimental_propagate_process_tags_enabled = true
end

expected_tags = Datadog::Core::Environment::Process.serialized

described_class.publish(Datadog.configuration)

expect(content).to include('process_tags' => expected_tags)
expect(expected_tags).not_to be_empty
end
Copy link
Member

Choose a reason for hiding this comment

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

It's a good practice, to leave in it only the part responsible for the assertion. And in RSpec we have tools to do so, here is a refactored way

      before do
        Datadog.configure do |c|
          c.service = 'test-service'
          c.experimental_propagate_process_tags_enabled = true
        end
      end
      
      let(:expected_tags) { Datadog::Core::Environment::Process.serialized }

      it 'includes process tags' do
        expect { described_class.publish(Datadog.configuration) }.to
          change { content }.to hash_including('process_tags' => expected_tags)
      end

also there are some downsides of the existing checks

  1. Expected tags are unknown to the input and they asserted to be verified
  2. No transition check

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants