-
Notifications
You must be signed in to change notification settings - Fork 329
Add apollo.subscription.end_reason attribute to subscription spans #8858
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
base: dev
Are you sure you want to change the base?
Add apollo.subscription.end_reason attribute to subscription spans #8858
Conversation
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 1 changed, 0 removedBuild ID: 98b9389ce2d3655a982c7563 URL: https://www.apollographql.com/docs/deploy-preview/98b9389ce2d3655a982c7563 |
This comment has been minimized.
This comment has been minimized.
a5c8dad to
b9ce87b
Compare
…errors' of https://github.com/apollographql/router into rohan-b99/subscription-observability-heartbeat-payload-errors
carodewig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! One comment/question below
|
|
||
| impl Drop for Multipart { | ||
| fn drop(&mut self) { | ||
| if !self.is_terminated { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this drop approach to setting the span attributes. How would you feel about moving the other cases (where self.is_terminated == true) into this function, rather than having them throughout the rest of the codebase here?
Adds two new span attributes that indicate why a streaming response (subscription or defer) ended:
apollo.subscription.end_reason: Records the reason a subscription was terminated. Possible values areserver_close,stream_end,heartbeat_delivery_failed,client_disconnect,schema_reload, andconfig_reload.apollo.defer.end_reason: Records the reason a deferred query ended. Possible values arecompleted(all deferred chunks were delivered successfully) andclient_disconnect(the client disconnected before all deferred data was delivered).Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
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. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
A lot of (if not most) features benefit from built-in observability and
debug-level logs. Please read this guidance on metrics best-practices. ↩Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩