Skip to content

Conversation

marcotc
Copy link
Member

@marcotc marcotc commented Aug 6, 2025

What does this PR do?

Related issue comment: #4170 (comment)

This PR updates the documentation on how to configure the GraphQL tracing mechanism, since it cannot be changed once first configuration today (the patching is irreversible).

Because auto-instrumentation always patches GraphQL if available at application startup, trying to change the mechanism in the Datadog.configure block does not work.

This PR leaves only the environment variable configuration options publicly documented, since they are the only ones that always work reliably.

The ultimate fix for this patching issues is unfortunately a breaking change, thus needs to wait until the next major release.

Change log entry
No.

@marcotc marcotc self-assigned this Aug 6, 2025
@marcotc marcotc requested a review from a team as a code owner August 6, 2025 20:31
@github-actions github-actions bot added the docs Involves documentation label Aug 6, 2025
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.55%. Comparing base (e171484) to head (6b274a8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4842      +/-   ##
==========================================
- Coverage   97.55%   97.55%   -0.01%     
==========================================
  Files        1490     1490              
  Lines       89156    89155       -1     
  Branches     4713     4713              
==========================================
- Hits        86978    86973       -5     
- Misses       2178     2182       +4     

☔ View full report in Codecov by Sentry.
📢 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.

| `with_unified_tracer` | `DD_TRACE_GRAPHQL_WITH_UNIFIED_TRACER` | `Bool` | (Recommended) Enable to instrument with `UnifiedTrace` tracer for `graphql` >= v2.2, **enabling support for Endpoints list** in the Service Catalog. `with_deprecated_tracer` has priority over this. Default is `false`, using `GraphQL::Tracing::DataDogTrace` instead. This option is disabled by default to maintain backwards compatibility, but **will become the default in `datadog` 3.0.0**. | `false` |
| `with_deprecated_tracer` | | `Bool` | (Not recommended) Enable to instrument with deprecated `GraphQL::Tracing::DataDogTracing`. This has priority over `with_unified_tracer`. Default is `false`, using `GraphQL::Tracing::DataDogTrace` instead | `false` |
| <!---`with_unified_tracer`--> | `DD_TRACE_GRAPHQL_WITH_UNIFIED_TRACER` | `Bool` | (Recommended) Enable to instrument with `UnifiedTrace` tracer for `graphql` >= v2.2, **enabling support for Endpoints list** in the Service Catalog. `with_deprecated_tracer` has priority over this. Default is `false`, using `GraphQL::Tracing::DataDogTrace` instead. This option is disabled by default to maintain backwards compatibility, but **will become the default in `datadog` 3.0.0**. | `false` |
| <!---`with_deprecated_tracer`--> | | `Bool` | (Not recommended) Enable to instrument with deprecated `GraphQL::Tracing::DataDogTracing`. This has priority over `with_unified_tracer`. Default is `false`, using `GraphQL::Tracing::DataDogTrace` instead | `false` |
Copy link
Member

@p-datadog p-datadog Aug 7, 2025

Choose a reason for hiding this comment

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

The descriptions still reference with_unified_tracer / with_deprecated_tracer that no longer exist (in these docs) as far as I can tell.

Copy link
Member

@y9v y9v left a comment

Choose a reason for hiding this comment

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

should we also add a warning when trying to reconfigure the GraphQL tracer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Involves documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants