Skip to content

[FEATURE]: Allow keeping version tag even if dd_service is not applied #4707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
joelim41 opened this issue Jun 3, 2025 · 1 comment
Open
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one

Comments

@joelim41
Copy link

joelim41 commented Jun 3, 2025

Gem Name

No response

Gem Version(s)

No response

Describe the goal of the feature

#4027 - this change removes the version tag for spans that are not using the default service name. We would like to have an option to opt out of this change to maintain the old behavior. It mentions that this is done to have parity with other tracing clients, can someone elaborate more on this?

Is your feature request related to a problem?

No response

Describe alternatives you've considered

No response

Additional context

No response

How does Datadog help you?

No response

@joelim41 joelim41 added feature-request A request for a new feature or change to an existing one community Was opened by a community member labels Jun 3, 2025
@ivoanjo ivoanjo pinned this issue Jun 5, 2025
@ivoanjo ivoanjo unpinned this issue Jun 5, 2025
@mabdinur
Copy link
Contributor

mabdinur commented Jun 6, 2025

Hi @joelim41,

This behavior has evolved over several versions of ddtrace.

In ddtrace < 2.5:

  • If DD_VERSION was set, the version tag was applied to all spans, regardless of the service name.

In ddtrace 2.5–2.7:

  • Due to PR #4027, DD_VERSION was applied only if the span’s service matched the global service name and that global service name was not the default value. This introduced a bug where DD_VERSION was inconsistently applied.

In ddtrace ≥ 2.8:

  • This behavior was corrected in PR #4075. Now, DD_VERSION is applied only if:
    • The span’s service matches the global service name.
    • The global service name is not a default value.
  • If a custom service name is used for a span, the global version tag is no longer applied, users must explicitly set the version tag for that span.

The rationale for this change is to ensure consistency in service and version tags across tracers (Unified Service Tagging). When a custom service name is specified, the corresponding version tag should also be set manually.

For users who prefer the legacy behavior (applying DD_VERSION to all spans), we recommend using a span processor to manually apply the version tag as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Was opened by a community member feature-request A request for a new feature or change to an existing one
Projects
None yet
Development

No branches or pull requests

2 participants