Skip to content

Add usage gauges for Datadog exporter sub-features (ROUTER-1962) - #10125

Open
SharkBaitDLS wants to merge 1 commit into
devfrom
sharkbaitdls/router-1962-datadog-usage-gauges-2x
Open

Add usage gauges for Datadog exporter sub-features (ROUTER-1962)#10125
SharkBaitDLS wants to merge 1 commit into
devfrom
sharkbaitdls/router-1962-datadog-usage-gauges-2x

Conversation

@SharkBaitDLS

@SharkBaitDLS SharkBaitDLS commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The native Datadog trace exporter's documented deprecation in favor of OTLP needs usage data to plan against, but today only exporter on/off is measurable (the opt.tracing.datadog attribute). This adds seven attributes to the existing apollo.router.config.telemetry gauge recording which Datadog-specific options are explicitly configured:

Attribute Config path
opt.tracing.datadog.enable_span_mapping telemetry.exporters.tracing.datadog.enable_span_mapping: true
opt.tracing.datadog.fixed_span_names ...datadog.fixed_span_names: true
opt.tracing.datadog.resource_mapping ...datadog.resource_mapping (set)
opt.tracing.datadog.span_metrics ...datadog.span_metrics (set)
opt.tracing.datadog.sampler ...datadog.sampler (value)
opt.tracing.common.preview_datadog_agent_sampling ...tracing.common.preview_datadog_agent_sampling: true
opt.tracing.propagation.datadog ...tracing.propagation.datadog: true

Semantics follow the existing pattern: attributes reflect explicit operator configuration (validated_yaml), not materialized defaults. No new instrument or mechanism — this extends the existing populate_config_instrument! block.

Targeting dev so the gauges reach the 2.x line, where most Datadog exporter usage lives; it reaches dev-v3.x through the regular forward-port.

ROUTER-1962

Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • PR description explains the motivation for the change and relevant context for reviewing
  • PR description links appropriate GitHub/Jira tickets (creating when necessary)
  • Changeset is included for user-facing changes
  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added3 and documented
  • Tests added and passing4
    • Unit tests
    • Integration tests
    • Manual tests, as necessary

Exceptions

  • Documentation: apollo.router.config.* gauges are internal usage instrumentation and are not part of the documented user-facing metrics surface; no doc change needed.
  • Integration tests: n/a — behavior is fully covered by the config-metrics snapshot unit test (configuration::metrics::test::test_metrics), consistent with all other attributes on this instrument.
  • Performance: additive attributes evaluated via jsonpath once per startup/config reload only; no per-request cost.

Notes

🤖 Generated with Claude Code

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. A lot of (if not most) features benefit from built-in observability and debug-level logs. Please read this guidance on metrics best-practices.

  4. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@apollo-librarian

apollo-librarian Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: ed475f08b2c59324c596d2ba
Build Logs: View logs


✅ AI Style Review — No Changes Detected

No MDX files were changed in this pull request.

Review Log: View detailed log

This review is AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.

The native Datadog trace exporter's deprecation in favor of OTLP has been
documented for some time. Today only exporter on/off is measurable via the
opt.tracing.datadog attribute; these new attributes on
apollo.router.config.telemetry record which Datadog-specific options are
explicitly configured (span mapping, fixed span names, resource mapping,
span metrics, per-exporter sampler, agent sampling, Datadog propagation),
so deprecation planning and migration guidance can be informed by usage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@SharkBaitDLS
SharkBaitDLS force-pushed the sharkbaitdls/router-1962-datadog-usage-gauges-2x branch from 2505daf to 9cf6f15 Compare September 1, 2026 00:11
@SharkBaitDLS
SharkBaitDLS marked this pull request as ready for review September 1, 2026 00:26
@SharkBaitDLS
SharkBaitDLS requested a review from a team as a code owner September 1, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant