Skip to content

Conversation

@wantsui
Copy link
Collaborator

@wantsui wantsui commented Nov 7, 2025

What does this PR do?

The goal of AIDM-253 is to add process tags to the trace payloads.

After this gets merged, the next step is to add it for the other products.

To run the tests in docker

docker compose run --rm tracer-3.3 /bin/bash

Main tests:

bundle install --gemfile /app/gemfiles/ruby_3.3_rails8.gemfile
bundle exec rake compile
bundle exec rake test:core_with_rails
TEST_DATADOG_INTEGRATION=1 BUNDLE_GEMFILE=/app/gemfiles/ruby_3.3_rails8.gemfile bundle exec rspec spec/datadog/core/environment/process_spec.rb


bundle exec rspec spec/datadog/tracing/transport/trace_formatter_spec.rb
bundle exec rspec spec/datadog/core/tag_normalizer_spec.rb
bundle exec rspec spec/datadog/core/configuration/settings_spec.rb

Motivation:

We're trying to add process tags to various payloads so they can be used in different use cases.

Note I still want to try adding server type but I'll have to tackle that in a separate PR.

Change log entry

Yes. Adds process tags to trace payloads with the new environment variable: DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED.

Additional Notes:

How to test the change?

… This is still missing memoization and additional tests.
@github-actions github-actions bot added core Involves Datadog core libraries tracing labels Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Thank you for updating Change log entry section 👏

Visited at: 2025-12-02 20:18:02 UTC

@datadog-official
Copy link

datadog-official bot commented Nov 7, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 98.08%
Total Coverage: 95.22% (+0.01%)

View detailed report

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

@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 Nov 7, 2025
@pr-commenter
Copy link

pr-commenter bot commented Nov 10, 2025

Benchmarks

Benchmark execution time: 2025-12-04 03:26:05

Comparing candidate commit 50d3392 in PR branch add-process-tags-to-tracing with baseline commit 7243ac3 in branch master.

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

scenario:error - error tracking, with_error=true - third_party only

  • 🟥 throughput [-640.577op/s; -597.599op/s] or [-5.672%; -5.291%]

scenario:tracing - Propagation - Trace Context

  • 🟥 throughput [-3650.334op/s; -3540.900op/s] or [-9.667%; -9.378%]

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

Typing analysis

Note: Ignored files are excluded from the next sections.

Untyped methods

This PR introduces 2 partially typed methods. It increases the percentage of typed methods from 55.46% to 55.53% (+0.07%).

Partially typed methods (+2-0)Introduced:
sig/datadog/core/tag_normalizer.rbs:11
└── def self.normalize: (untyped original_value, ?remove_digit_start_char: bool) -> ::String
sig/datadog/core/tag_normalizer.rbs:13
└── def self.normalize_process_value: (untyped value) -> ::String

If you believe a method or an attribute is rightfully untyped or partially typed, you can add # untyped:accept to the end of the line to remove it from the stats.

@p-datadog
Copy link
Member

This one is even more of a pickle:

big% ruby -e 'puts $0; sleep 1000000000'
-e

wantsui and others added 3 commits December 2, 2025 16:50
… need to add the additional process values normalization logic for service names since they can only be 100 characters and cannot have colons.
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.

I added a commit changing before/after to around for the $0 override.

Copy link
Member

@marcotc marcotc left a comment

Choose a reason for hiding this comment

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

I recommend applying the renamming suggested by @Strech in 5cae372#r2584467486, but all else is good!

… tests for the singular version of MAX_PROCESS_VALUE_BYTE_SIZE
@wantsui wantsui merged commit 6cb632a into master Dec 4, 2025
553 checks passed
@wantsui wantsui deleted the add-process-tags-to-tracing branch December 4, 2025 17:57
@github-actions github-actions bot added this to the 2.23.0 milestone Dec 4, 2025
p-datadog pushed a commit that referenced this pull request Dec 8, 2025
* master: (523 commits)
  DI: relax upper bound for reported long method duration (#5113)
  Change development guide to use Ruby 3.4 by default (#5112)
  Fix exception in RC on OpenFeature::Engine absence
  [🤖] Update Latest Dependency: https://github.com/DataDog/dd-trace-rb/actions/runs/19996135509
  [🤖] Update System Tests: https://github.com/DataDog/dd-trace-rb/actions/runs/19996155319
  Add ruby guikld to all dsm files
  add DSM to codeowners
  feat: add process tags to traces (#5033)
  DEBUG-3558 DI: chunk snapshot payloads (#5086)
  CI: enable push_to_test_optimization unless this is a pull request from a fork
  fix steep checks
  [🤖] Lock Dependency: https://github.com/DataDog/dd-trace-rb/actions/runs/19827679824
  [🤖] Lock Dependency: https://github.com/DataDog/dd-trace-rb/actions/runs/19827296218
  Add test to verify consumer backlog serialization with kafka_commit tag
  Remove one diagnostic output
  Install rubygems
  Add diagnostic steps
  Use default rubygems+bundler for each Ruby version
  Revert "Disable profiling specs for 4.0"
  Use git `datadog-ruby_core_source` having 4.0
  ...
@Strech Strech mentioned this pull request Dec 11, 2025
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 tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants