Skip to content

Fix NameError: uninitialized constant Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE #5830

Merged
marcotc merged 1 commit into
masterfrom
tonycthsu/restore-constant
May 28, 2026
Merged

Fix NameError: uninitialized constant Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE #5830
marcotc merged 1 commit into
masterfrom
tonycthsu/restore-constant

Conversation

@TonyCTHsu

Copy link
Copy Markdown
Collaborator

What does this PR do?

Reverts b806387, restoring the Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE constant as an alias to Datadog::Tracing::Metadata::Ext::TAG_BASE_SERVICE.

Motivation:

A customer reported NameError: uninitialized constant Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE after upgrading to v2.34.0. The constant was removed as part of internal cleanup after the prior commit moved base_service tagging into a centralized before-finish hook, but it was reachable from outside the gem and at least one customer was relying on it.

Change log entry

Yes. Restore Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE constant that was unintentionally removed in v2.34.0.

Additional Notes:

The alias target Datadog::Tracing::Metadata::Ext::TAG_BASE_SERVICE is unchanged, so this is a pure restoration with no internal callsite impact.

How to test the change?

require 'datadog'
Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE
# => "_dd.base_service"

@TonyCTHsu
TonyCTHsu requested review from a team as code owners May 28, 2026 11:01
@TonyCTHsu
TonyCTHsu requested a review from marcotc May 28, 2026 11:01
@TonyCTHsu TonyCTHsu 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 May 28, 2026
@TonyCTHsu
TonyCTHsu requested a review from mabdinur May 28, 2026 11:01
@dd-octo-sts dd-octo-sts Bot added integrations Involves tracing integrations tracing labels May 28, 2026
@TonyCTHsu TonyCTHsu changed the title Restore Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE constant Fix NameError: uninitialized constant Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE May 28, 2026
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented May 28, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 97.07% (-0.00%)

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

@pr-commenter

pr-commenter Bot commented May 28, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-05-28 11:26:25

Comparing candidate commit 29c95c4 in PR branch tonycthsu/restore-constant with baseline commit 974464f in branch master.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@marcotc
marcotc merged commit dd4b64c into master May 28, 2026
588 checks passed
@marcotc
marcotc deleted the tonycthsu/restore-constant branch May 28, 2026 20:13
@dd-octo-sts dd-octo-sts Bot added this to the 2.35.0 milestone May 28, 2026
@Strech Strech mentioned this pull request Jun 3, 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 integrations Involves tracing integrations tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: uninitialized constant Datadog::Tracing::Contrib::Ext::Metadata::TAG_BASE_SERVICE

3 participants