Skip to content

Add response body fields#8158

Merged
Velfi merged 14 commits intodevfrom
add-response-body-fields
Aug 28, 2025
Merged

Add response body fields#8158
Velfi merged 14 commits intodevfrom
add-response-body-fields

Conversation

@Velfi
Copy link
Contributor

@Velfi Velfi commented Aug 28, 2025

Introducing the ResponseErrors selector in telemetry configurations to capture router response errors, allowing users to capture and log errors encountered at the router service layer. This new selector enhances logging for the router service, as it allows users the option to only log router errors instead of the entire router response body to reduce noise.

telemetry:
  instrumentation:
    events:
      router:
         router.error:
            attributes:
               "my_attribute":
                   response_errors: "$.[0]"
                   # Examples: "$.[0].message", "$.[0].locations", "$.[0].extensions", etc.

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

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

@Velfi Velfi requested a review from a team August 28, 2025 14:24
@Velfi Velfi requested a review from a team as a code owner August 28, 2025 14:24
@apollo-librarian
Copy link

apollo-librarian bot commented Aug 28, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 1 changed, 0 removed
* graphos/routing/(latest)/observability/telemetry/instrumentation/selectors.mdx

Build ID: af0556f67acc70da2b68654e
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/af0556f67acc70da2b68654e

@Velfi Velfi mentioned this pull request Aug 28, 2025
10 tasks
@Velfi Velfi enabled auto-merge (squash) August 28, 2025 14:25
@Velfi Velfi merged commit 6088f56 into dev Aug 28, 2025
15 of 16 checks passed
@Velfi Velfi deleted the add-response-body-fields branch August 28, 2025 14:27
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.

3 participants