Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow sending the subgraph.graphql.document attribute to Studio via OTLP #5886

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

timbotnik
Copy link
Contributor

@timbotnik timbotnik commented Aug 27, 2024

There is valuable information in OTel traces that is not being passed to Studio, specifically the GraphQL document being sent to a subgraph. Today, we filter this attribute out from the Studio path.

After this change, if a user is using the “recommended” attribute config or enables this with a specific attribute configuration, Router would allow the subgraph document to flow through to traces sent to Studio. e.g.

telemetry:
  instrumentation:
    spans:
      default_attribute_requirement_level: recommended

or

telemetry:
  instrumentation:
    spans:
      subgraph:
        attributes:
          subgraph.graphql.document: true

We should decide if this is something that would make sense to enable. There are potential downsides:

  • More data will be sent on the wire to Studio to capture these GraphQL document payloads.
  • Potentially PII could be included in any inline variables

image

I'd feel less concerned about this if it was:

  • Fully opt-in rather than being included with our "recommended" options
  • Using the normalized operation string instead of the raw document

Fixes #issue_number


Checklist

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

  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Tests added and passing3
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

Note any exceptions here

Notes

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. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

If a user is using the “recommended” attribute config or enables this with a specific attribute configuration, allow the subgraph document to flow through to traces sent to Studio.
Copy link
Contributor

@timbotnik, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

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