apollographql / router

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

fix(telemetry): display custom event attributes properly on subscription events #6033

Closed bnjjj closed 1 day ago

bnjjj commented 1 week ago

Display custom event attributes properly on subscription events

Custom event attributes set using selectors at the supergraph level is now displayed properly. Example of configuration:

telemetry:
  instrumentation:
    events:
      supergraph:
        supergraph.event:
          message: supergraph event
          on: event_response # on every supergraph event (like subscription event for example)
          level: info
          attributes:
            test:
              static: foo
            response.data:
              response_data: $ # Display all the response data payload
            response.errors:
              response_errors: $ # Display all the response errors payload

Don't send apollo_private.* attributes to Jaeger collector

When using Jaeger collector to send traces you will no longer receive useless span attributes prefixed with apollo_private.


Checklist

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

Exceptions

Note any exceptions here

Notes

[^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.

github-actions[bot] commented 1 week ago

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

router-perf[bot] commented 1 week ago

CI performance tests