Skip to content

feat(startup-log): report OTLP export status - #9517

Merged
BridgeAR merged 3 commits into
masterfrom
brian.marks/otlp-export-startup-log
Jul 27, 2026
Merged

feat(startup-log): report OTLP export status#9517
BridgeAR merged 3 commits into
masterfrom
brian.marks/otlp-export-startup-log

Conversation

@bm1549

@bm1549 bm1549 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds three boolean fields to the DATADOG TRACER CONFIGURATION startup log that report whether the tracer exports each telemetry signal over OTLP:

  • otlp_traces_export_enabledtrue when OTEL_TRACES_EXPORTER is otlp and the tracer isn't running in Test Optimization mode (Test Optimization keeps test spans on the citestcycle endpoint instead of OTLP).
  • otlp_metrics_export_enabled — reflects DD_METRICS_OTEL_ENABLED.
  • otlp_logs_export_enabled — reflects DD_LOGS_OTEL_ENABLED.

The startup-log spec is updated to cover the new fields, the Test Optimization case, and the default all-false state.

Motivation

Part of a cross-tracer effort to surface OTLP export status uniformly. Each dd-trace library emits the same JSON keys in its startup log, so the state reads the same way regardless of language.

Additional Notes

The values mirror the tracer's actual export behavior rather than the raw environment variables: the traces flag applies the same !isCiVisibility guard the exporter uses, and the metrics/logs flags read the config values the OTLP pipelines gate on.


Related PRs — cross-tracer OTLP startup-log effort


CI note

The integration-webpack (node-active / node-latest) failures are pre-existing and unrelated to this change: the webpack test fixture's npm run build fails resolving a transitive dependency (@ljharb/tsconfig). The same two jobs fail intermittently on master, and the other Node versions (oldest/maintenance) pass. Not introduced by this PR.

Add three boolean fields to the DATADOG TRACER CONFIGURATION startup log
indicating whether the tracer exports each telemetry signal over OTLP:

- otlp_traces_export_enabled  (OTEL_TRACES_EXPORTER === 'otlp', excluding
  Test Optimization mode, which keeps test spans on the citestcycle endpoint)
- otlp_metrics_export_enabled (DD_METRICS_OTEL_ENABLED)
- otlp_logs_export_enabled    (DD_LOGS_OTEL_ENABLED)

The snake_case keys are chosen for cross-language startup-log consistency.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bm1549 bm1549 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 Jul 24, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 7.48 MB
Deduped: 8.14 MB
No deduping: 8.14 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.2 | 124.41 kB | 440.65 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jul 24, 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: 73.55% (-24.90%)

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

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.45%. Comparing base (1887905) to head (430341e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #9517    +/-   ##
========================================
  Coverage   98.45%   98.45%            
========================================
  Files         948      948            
  Lines      128608   128611     +3     
  Branches    11098    10853   -245     
========================================
+ Hits       126620   126623     +3     
  Misses       1988     1988            
Flag Coverage Δ
aiguard 57.53% <100.00%> (-0.03%) ⬇️
aiguard-integration 56.36% <100.00%> (+<0.01%) ⬆️
apm-bucket-0 57.78% <100.00%> (-0.03%) ⬇️
apm-bucket-1 64.07% <100.00%> (-0.02%) ⬇️
apm-bucket-2 62.83% <100.00%> (-0.02%) ⬇️
apm-bucket-3 60.27% <100.00%> (-0.02%) ⬇️
apm-capabilities-tracing 62.72% <100.00%> (+<0.01%) ⬆️
apm-integrations-aerospike 56.87% <100.00%> (-0.03%) ⬇️
apm-integrations-confluentinc-kafka-javascript 61.67% <100.00%> (-0.06%) ⬇️
apm-integrations-couchbase 57.22% <100.00%> (-0.03%) ⬇️
apm-integrations-http 62.85% <100.00%> (-0.02%) ⬇️
apm-integrations-kafkajs 62.31% <100.00%> (-0.03%) ⬇️
apm-integrations-next 59.31% <100.00%> (-0.02%) ⬇️
apm-integrations-prisma 58.80% <100.00%> (-0.02%) ⬇️
appsec 72.98% <100.00%> (-0.02%) ⬇️
appsec-express_fastify_graphql 70.44% <100.00%> (-0.02%) ⬇️
appsec-integration 51.52% <100.00%> (-0.01%) ⬇️
appsec-kafka_ldapjs_lodash 64.03% <100.00%> (-0.05%) ⬇️
appsec-mongodb-core_mongoose_mysql 67.75% <100.00%> (-0.02%) ⬇️
appsec-next 57.65% <100.00%> (-0.02%) ⬇️
appsec-node-serialize_passport_postgres 67.43% <100.00%> (-0.02%) ⬇️
appsec-sourcing_stripe_template 65.77% <100.00%> (-0.02%) ⬇️
debugger 64.96% <100.00%> (-0.04%) ⬇️
instrumentations-bucket-0 51.89% <100.00%> (-0.02%) ⬇️
instrumentations-bucket-1 60.35% <100.00%> (-0.02%) ⬇️
instrumentations-bucket-10 62.15% <100.00%> (-0.02%) ⬇️
instrumentations-bucket-11 51.80% <100.00%> (-0.03%) ⬇️
instrumentations-bucket-12 52.37% <100.00%> (-0.02%) ⬇️
instrumentations-bucket-13 51.91% <100.00%> (-0.03%) ⬇️
instrumentations-bucket-2 53.79% <100.00%> (-0.02%) ⬇️
instrumentations-bucket-3 59.36% <100.00%> (-0.02%) ⬇️
instrumentations-bucket-4 52.45% <100.00%> (-0.03%) ⬇️
instrumentations-bucket-5 57.70% <100.00%> (-0.02%) ⬇️
instrumentations-bucket-6 60.91% <100.00%> (-0.03%) ⬇️
instrumentations-bucket-7 58.55% <100.00%> (-0.03%) ⬇️
instrumentations-bucket-8 59.70% <100.00%> (-0.02%) ⬇️
instrumentations-bucket-9 61.67% <100.00%> (-0.02%) ⬇️
instrumentations-instrumentation-couchbase 51.20% <100.00%> (-0.03%) ⬇️
instrumentations-integration-esbuild 34.34% <0.00%> (-0.01%) ⬇️
llmobs-ai_anthropic_bedrock 63.02% <100.00%> (-0.02%) ⬇️
llmobs-bucket-1 61.74% <100.00%> (-0.02%) ⬇️
llmobs-openai 62.36% <100.00%> (-0.02%) ⬇️
llmobs-openai-agents_vertex-ai 60.25% <100.00%> (-0.03%) ⬇️
llmobs-sdk 65.83% <100.00%> (-0.03%) ⬇️
master-coverage 98.45% <100.00%> (?)
openfeature 56.24% <100.00%> (+<0.01%) ⬆️
openfeature-unit 53.53% <100.00%> (-0.03%) ⬇️
platform-core_esbuild_instrumentations-misc 40.89% <100.00%> (-0.02%) ⬇️
platform-integration 61.54% <100.00%> (+<0.01%) ⬆️
platform-shimmer_unit-guardrails_webpack 39.31% <100.00%> (-0.02%) ⬇️
plugins-bucket-0 57.21% <100.00%> (-0.02%) ⬇️
plugins-bucket-1 54.49% <100.00%> (+<0.01%) ⬆️
plugins-bucket-11 62.39% <100.00%> (-0.02%) ⬇️
plugins-bucket-18 62.09% <100.00%> (-0.02%) ⬇️
plugins-bucket-19 60.19% <100.00%> (-0.02%) ⬇️
plugins-bucket-20 62.19% <100.00%> (-0.02%) ⬇️
plugins-bucket-4 58.72% <100.00%> (-0.02%) ⬇️
plugins-bullmq_cassandra_cookie 61.88% <100.00%> (-0.02%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 56.87% <100.00%> (-0.03%) ⬇️
plugins-fetch_fs_generic-pool 58.94% <100.00%> (-0.02%) ⬇️
plugins-google-cloud-pubsub_grpc_handlebars 64.80% <100.00%> (-0.02%) ⬇️
plugins-hapi_hono_ioredis 60.36% <100.00%> (-0.02%) ⬇️
plugins-jest_knex_langgraph 55.75% <100.00%> (-0.02%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 58.64% <100.00%> (-0.04%) ⬇️
plugins-lodash_mariadb_memcached 58.23% <100.00%> (-0.03%) ⬇️
plugins-moleculer_mongodb_mongodb-core 62.05% <100.00%> (-0.02%) ⬇️
plugins-mongoose_multer_mysql 59.23% <100.00%> (-0.02%) ⬇️
plugins-mysql2_nats_node-serialize 60.86% <100.00%> (-0.02%) ⬇️
plugins-opensearch_passport-http_pino 59.71% <100.00%> (-0.02%) ⬇️
plugins-postgres_process_pug 58.43% <100.00%> (-0.03%) ⬇️
plugins-redis_router_sequelize 62.25% <100.00%> (-0.02%) ⬇️
plugins-test-and-upstream-rhea_undici_url 61.78% <100.00%> (-0.02%) ⬇️
plugins-valkey_vm_winston 58.16% <100.00%> (-0.02%) ⬇️
plugins-ws 59.74% <100.00%> (-0.02%) ⬇️
profiling 62.27% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-aws-sdk 55.21% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-bedrockruntime 54.91% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-client 56.60% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-dynamodb 55.81% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-eventbridge 49.54% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-kinesis 59.48% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-lambda 57.55% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-s3 55.90% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-serverless-peer-service 59.90% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-sns 60.33% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-sqs 60.77% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-stepfunctions 55.73% <100.00%> (-0.02%) ⬇️
serverless-aws-sdk-util 51.64% <100.00%> (-0.03%) ⬇️
serverless-bucket-0 54.41% <100.00%> (+<0.01%) ⬆️
serverless-bucket-1 59.39% <100.00%> (-0.02%) ⬇️
test-optimization-cucumber 72.14% <0.00%> (+<0.01%) ⬆️
test-optimization-cypress 65.88% <0.00%> (-0.01%) ⬇️
test-optimization-jest 73.38% <100.00%> (-0.06%) ⬇️
test-optimization-mocha 73.64% <100.00%> (+0.04%) ⬆️
test-optimization-playwright-playwright-atr 60.57% <0.00%> (-0.03%) ⬇️
test-optimization-playwright-playwright-efd 60.82% <0.00%> (+0.04%) ⬆️
test-optimization-playwright-playwright-final-status 60.73% <0.00%> (-0.03%) ⬇️
test-optimization-playwright-playwright-impacted-tests 60.45% <0.00%> (+0.14%) ⬆️
test-optimization-playwright-playwright-reporting 61.69% <0.00%> (-0.13%) ⬇️
test-optimization-playwright-playwright-test-management 61.27% <0.00%> (-0.13%) ⬇️
test-optimization-playwright-playwright-test-span 60.67% <0.00%> (-0.09%) ⬇️
test-optimization-selenium 60.18% <0.00%> (-0.17%) ⬇️
test-optimization-testopt 58.60% <100.00%> (+0.08%) ⬆️
test-optimization-vitest 70.42% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter

pr-commenter Bot commented Jul 24, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-27 20:04:55

Comparing candidate commit 430341e in PR branch brian.marks/otlp-export-startup-log with baseline commit 1887905 in branch master.

📊 Benchmarking dashboard

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

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-210.753ms; +200.934ms] or [-7.871%; +7.505%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-249.274ms; +212.908ms] or [-9.804%; +8.374%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-192.071ms; +177.910ms] or [-6.602%; +6.115%]

scenario:appsec-control-20

  • unstable execution_time [-125.242ms; +120.602ms] or [-7.651%; +7.368%]

scenario:appsec-control-24

  • unstable execution_time [-115.006ms; +118.381ms] or [-9.250%; +9.522%]

scenario:appsec-control-26

  • unstable execution_time [-123251.180µs; +122982.747µs] or [-9.963%; +9.942%]

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-15.004ms; +10.605ms] or [-5.957%; +4.210%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-20

  • unstable execution_time [-9.566ms; +26.073ms] or [-3.703%; +10.092%]

scenario:appsec-iast-with-vulnerability-control-20

  • unstable execution_time [-28500.001µs; +28699.534µs] or [-5.191%; +5.227%]

scenario:child_process-file-args-24

  • unstable cpu_usage_percentage [-6.668%; +3.350%]
  • unstable execution_time [-20.865ms; +42.221ms] or [-4.391%; +8.884%]
  • unstable throughput [-148883.433op/s; +84204.828op/s] or [-6.754%; +3.820%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable cpu_user_time [-2018.585ms; +3257.782ms] or [-24.370%; +39.331%]
  • unstable execution_time [-2000.036ms; +3282.153ms] or [-22.190%; +36.415%]
  • unstable instructions [-17.1G instructions; +27.3G instructions] or [-25.212%; +40.311%]
  • unstable max_rss_usage [-8.445MB; +13.239MB] or [-5.381%; +8.436%]
  • unstable throughput [-872.274op/s; +521.981op/s] or [-23.844%; +14.268%]

scenario:debugger-line-probe-with-snapshot-default-26

  • unstable cpu_user_time [-2709.677ms; +4128.182ms] or [-28.234%; +43.014%]
  • unstable execution_time [-2783.187ms; +4128.080ms] or [-26.925%; +39.936%]
  • unstable instructions [-23.9G instructions; +36.7G instructions] or [-29.906%; +45.901%]
  • unstable max_rss_usage [-9.161MB; +12.893MB] or [-5.769%; +8.119%]
  • unstable throughput [-792.764op/s; +564.019op/s] or [-24.718%; +17.586%]

scenario:debugger-line-probe-with-snapshot-minimal-24

  • unstable cpu_user_time [-2.230s; +4.594s] or [-22.131%; +45.585%]
  • unstable execution_time [-2.295s; +4.661s] or [-21.258%; +43.180%]
  • unstable instructions [-24.6G instructions; +41.5G instructions] or [-30.884%; +52.107%]
  • unstable max_rss_usage [-9.725MB; +18.862MB] or [-5.907%; +11.456%]
  • unstable throughput [-1235.474op/s; +614.589op/s] or [-38.770%; +19.286%]

scenario:debugger-line-probe-with-snapshot-minimal-26

  • unstable cpu_user_time [-629.540ms; +941.527ms] or [-7.032%; +10.517%]
  • unstable execution_time [-740.538ms; +1075.982ms] or [-7.664%; +11.136%]
  • unstable instructions [-5.1G instructions; +8.3G instructions] or [-6.925%; +11.160%]
  • unstable throughput [-314.096op/s; +219.941op/s] or [-9.426%; +6.600%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-284.221ms; +305.486ms] or [-5.718%; +6.146%]
  • unstable execution_time [-281.860ms; +299.725ms] or [-5.580%; +5.933%]
  • unstable throughput [-103676.350op/s; +97362.685op/s] or [-6.254%; +5.873%]

scenario:plugin-claude-agent-sdk-compact-stream-scan-24

  • unstable cpu_usage_percentage [-5.101%; +6.109%]

scenario:plugin-graphql-long-with-depth-and-collapse-off-20

  • unstable max_rss_usage [-33.221MB; +14.975MB] or [-8.262%; +3.724%]

scenario:plugin-graphql-long-with-depth-off-26

  • unstable max_rss_usage [-22700.750KB; +21965.893KB] or [-10.454%; +10.116%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable cpu_user_time [-582.775ms; +597.354ms] or [-5.052%; +5.179%]
  • unstable execution_time [-595.115ms; +607.293ms] or [-5.055%; +5.159%]
  • unstable throughput [-3.517op/s; +3.471op/s] or [-5.146%; +5.079%]

scenario:plugin-pg-service-20

  • unstable cpu_usage_percentage [-6.503%; +4.074%]
  • unstable execution_time [-90.773ms; +138.717ms] or [-5.587%; +8.538%]
  • unstable throughput [-246217.362op/s; +162597.688op/s] or [-6.611%; +4.366%]

scenario:plugin-pg-service-26

  • unstable cpu_usage_percentage [-7.191%; +4.265%]
  • unstable execution_time [-55.495ms; +83.957ms] or [-6.157%; +9.315%]
  • unstable throughput [-501603.725op/s; +342555.362op/s] or [-7.433%; +5.076%]

scenario:plugin-pino-json-log-injection-24

  • unstable execution_time [-112.495ms; +182.309ms] or [-3.896%; +6.314%]

@bm1549
bm1549 marked this pull request as ready for review July 24, 2026 21:41
@bm1549
bm1549 requested a review from a team as a code owner July 24, 2026 21:41
@bm1549
bm1549 requested review from khanayan123 and removed request for a team July 24, 2026 21:41

@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: 9444363f82

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/dd-trace/test/startup-log.spec.js
bm1549 and others added 2 commits July 24, 2026 18:41
…ag tests

The `otlp export flags` cleanup only cleared OTEL_TRACES_EXPORTER, leaving
OTEL_METRICS_EXPORTER and OTEL_LOGS_EXPORTER set. In shells that export
OTEL_METRICS_EXPORTER=none, config forces DD_METRICS_OTEL_ENABLED back to
false, so the metrics positive case no longer observes the enabled flag.
Clear all three OTEL_*_EXPORTER selectors in the shared cleanup so the
tests are deterministic regardless of the surrounding shell.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤷

@BridgeAR
BridgeAR merged commit d5086a5 into master Jul 27, 2026
692 of 694 checks passed
@BridgeAR
BridgeAR deleted the brian.marks/otlp-export-startup-log branch July 27, 2026 20:14
This was referenced Jul 28, 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 semver-minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants