Skip to content

For agent URL configuration, consider empty environment variables as unset - #353

Merged
xlamorlette-datadog merged 1 commit into
mainfrom
xlamorlette/fix-empty-agent-env-variables
Aug 13, 2026
Merged

For agent URL configuration, consider empty environment variables as unset#353
xlamorlette-datadog merged 1 commit into
mainfrom
xlamorlette/fix-empty-agent-env-variables

Conversation

@xlamorlette-datadog

@xlamorlette-datadog xlamorlette-datadog commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Description

When reading the DD_TRACE_AGENT_URL, DD_AGENT_HOST and DD_TRACE_AGENT_PORT environment variables for the configuration of the agent, consider empty values as unset.

Motivation

This was discovered when activating the handling of IPv6 agent host addresses in System Tests. See the error:

unable to initialize tracer:Datadog Agent URL is missing the "://" separator: ""

Actually, this does not come from the newly implemented handling of IPv6 agent host addresses, this was a bug already present before.

Additional Notes

Jira ticket: IDMPL-760 [C++ Tracer] Bug: empty environment variables for agent configuration not handled correctly

performance/ignore-performance-regression: We get very often high values for BM_TraceID_ParseHex whereas the relative code has not been touched:

[STDERR] Fail on regression  | FAIL! Metric MetricName.EXECUTION_TIME in scenario:BM_TraceID_ParseHex/64bit has regression +32.48%, larger than threshold 5.00%.
[STDERR] Fail on regression  | FAIL! Metric MetricName.EXECUTION_TIME in scenario:BM_TraceID_ParseHex/128bit has regression +40.50%, larger than threshold 5.00%.

@xlamorlette-datadog xlamorlette-datadog changed the title For agent URL configuration, consider empty environment variables as … For agent URL configuration, consider empty environment variables as unset Aug 12, 2026
@pr-commenter

pr-commenter Bot commented Aug 12, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-12 14:33:41

Comparing candidate commit af3dcdb in PR branch xlamorlette/fix-empty-agent-env-variables with baseline commit 2e86335 in branch main.

Found 0 performance improvements and 2 performance regressions! Performance is the same for 6 metrics, 0 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 ----------------------------------'

scenario:BM_TraceID_ParseHex/128bit

  • 🟥 execution_time [+49.771ns; +49.956ns] or [+40.504%; +40.656%]

scenario:BM_TraceID_ParseHex/64bit

  • 🟥 execution_time [+22.502ns; +22.517ns] or [+32.484%; +32.505%]

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Aug 12, 2026

Copy link
Copy Markdown

Pipelines

Unblock PR with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

DataDog/apm-reliability/dd-trace-cpp | check-big-regressions   View in Datadog   GitLab

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 84.48% (+0.01%)

Useful? React with 👍 / 👎

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

@xlamorlette-datadog
xlamorlette-datadog marked this pull request as ready for review August 12, 2026 14:39
@xlamorlette-datadog
xlamorlette-datadog requested review from a team as code owners August 12, 2026 14:39
@xlamorlette-datadog
xlamorlette-datadog requested review from tabgok and removed request for a team August 12, 2026 14:39
@xlamorlette-datadog
xlamorlette-datadog merged commit 765983d into main Aug 13, 2026
64 of 68 checks passed
@xlamorlette-datadog
xlamorlette-datadog deleted the xlamorlette/fix-empty-agent-env-variables branch August 13, 2026 09:03
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.

2 participants