-
Notifications
You must be signed in to change notification settings - Fork 273
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
Provide request signature calculated by usage plugin in context #4558
Comments
Hi, thanks for opening this issue! We introduced the context's It behaves the same as operation signature, and is used in studio as well:
Would this fit your usecase? |
Unfortunately not --- that is not the same as operation signature, its a hash of the operation signature. We require the actual signature itself for our own observability purposes -> we want acces to the value usage_reporting.stats_report_key, not stats_report_key_hash(usage_reporting.stats_report_key.as_str()) router/apollo-router/src/query_planner/caching_query_planner.rs Lines 253 to 255 in 2ffcb89
|
We are making some changes to the operation signature soon, and we'd want to wait for those to land before we expose this API. |
Q: Double checking for planning purposes..... will the resulting signature for the same query in Apollo Gateway and Apollo Router still stay the same, its just more about the implementation details thats changing? |
It will be the same signature and "Apollo operation ID". |
after discussion, it appears this won't be blocked by the operation signature changes, so I'm opening a PR to make it available in #4864 |
Is your feature request related to a problem? Please describe.
The instrumentation required by our company leverages the exact same operation signature as generated by the UsageReporting plugin and exposed on the span as apollo_private.operation_signature via plugins/telemetry/mod.rs
Describe the solution you'd like
Please provide the ability to expose and make available the string representation of the operation via the context
Describe alternatives you've considered
We have considered repeating the operation signature calculation (and caching) a second time in our own plugin code.... this will add additional processing and memory overhead that we do not want to incur in Router.
Additional context
Currently these fields are available in the context:
operation_name
operation_kind
so something like
operation_signature
seems like a candidate key to make available via the context.The text was updated successfully, but these errors were encountered: