Skip to content

refactor(trace-utils)!: split generic TracerHeaderTags - #2279

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
anais/split-tracer-header-tags
Jul 28, 2026
Merged

refactor(trace-utils)!: split generic TracerHeaderTags#2279
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
anais/split-tracer-header-tags

Conversation

@anais-raison

@anais-raison anais-raison commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Splits TracerHeaderTags into two parts: the tracer-identity strings (lang, lang_version, tracer_version, etc.) stay as-is, and the generic bool/int flags (client_computed_stats, client_computed_top_level, dropped_p0_traces, dropped_p0_spans) are pulled into a new standalone TracerGenericTags struct, embedded as TracerHeaderTags::generic.

Motivation

TracerHeaderTags mixed tracer-identity strings with generic bool/int flags. The latter are meaningful independently of the string metadata, so pulling them into their own struct lets them be carried on their own in contexts where the string fields would be redundant (e.g. payload formats that already embed the tracer identity), without forcing a full split of the type.

Additional Notes

Raised during review of #2156. Prepared as a separate PR to keep #2156 scoped to the sidecar-specific V04→V1 changes.

This PR alone is a no-op refactor — TracerGenericTags is still only used embedded in TracerHeaderTags. The actual payoff comes in #2156: the V1 trace-sending path already carries the tracer identity in the V1 payload itself, so send_trace_v1 will be able to pass just TracerGenericTags (a small Copy struct, no serialization needed) across the sidecar's IPC boundary instead of the full TracerHeaderTags/SerializedTracerHeaderTags, which currently re-transmits redundant string data.

…nericTags

TracerHeaderTags mixed tracer-identity strings (lang, version, etc.) with
generic bool/int flags (client_computed_stats, dropped_p0_traces, ...).
The latter are meaningful independently of the string metadata, so pull
them into a standalone TracerGenericTags struct that can be carried on
its own where the string fields would be redundant.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@anais-raison
anais-raison marked this pull request as ready for review July 27, 2026 11:53
@anais-raison
anais-raison requested review from a team as code owners July 27, 2026 11:53
@datadog-datadog-us1-prod

datadog-datadog-us1-prod Bot commented Jul 27, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 92.59%
Overall Coverage: 74.61% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7b79f50 | Docs | Datadog PR Page | Give us feedback!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b79f50b18

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread libdd-trace-utils/src/tracer_header_tags.rs
@bwoebi bwoebi changed the title refactor(trace-utils): split generic TracerHeaderTags refactor(trace-utils)!: split generic TracerHeaderTags Jul 27, 2026
Comment thread libdd-trace-utils/src/tracer_header_tags.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants