apollographql / router

A configurable, high-performance routing runtime for Apollo Federation 🚀
https://www.apollographql.com/docs/router/
Other
806 stars 272 forks source link

experimental_response_trace_id is enabled by default when dev mode is enabled #4337

Open danpayne17 opened 10 months ago

danpayne17 commented 10 months ago

Describe the bug experimental_response_trace_id is enabled by default when dev mode is enabled and cannot be disabled in yaml config. Documentation does not state that this should be enabled by default when dev mode is enabled

To Reproduce Steps to reproduce the behavior: Start the router with dev mode enabled: ./router --dev

OR

Start the router with dev mode enabled and the following router yaml config:

telemetry:
  exporters:
    tracing:
      experimental_response_trace_id:
        enabled: false

Expected behavior experimental_response_trace_id should not be enabled because documentation states it should be disabled by default and it should be disabled when explicitly disabling in router yaml config. The below log statement should not appear in the logs. The feature should disabled when explicitly disabling it in yaml config.

Output This is actual output from router when starting it with dev mode enabled:

You're using some "experimental" features of the Apollo Router (those which have their configuration prefixed by "experimental_").
We may make breaking changes in future releases. To help us design the stable version we need your feedback.
Here is a list of links where you can give your opinion:

    - experimental_response_trace_id: https://github.com/apollographql/router/discussions/2147

Furthermore, I get the apollo-trace-id in the response:

HTTP/1.1 200 OK
apollo-trace-id: 5d027e1dbe8e8908393b6b1741c33608
content-type: application/json
vary: origin
content-length: 65
date: Tue, 05 Dec 2023 20:24:54 GMT

Desktop (please complete the following information):

BrynCooke commented 10 months ago

@bnjjj Do you remember why we enable this in dev mode by default?

bnjjj commented 10 months ago

Not really, I don't remember. But IMHO the real problem is not being able to override the configuration don't you think ?

abernix commented 9 months ago

Thanks for opening this @danpayne17. Sounds like there might be three things to look at and fix here — leaving these notes here as context to myself:

  1. That it's not possible to override the configuration asserted in dev mode via explicit YAML.
  2. Why it's not documented — even if it's intentional or not.
  3. That we have an experimental option enabled by default in dev mode.