-
Notifications
You must be signed in to change notification settings - Fork 192
fix(router): use proper OTEL span kind for Authenticate middleware step
#2247
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: main
Are you sure you want to change the base?
fix(router): use proper OTEL span kind for Authenticate middleware step
#2247
Conversation
WalkthroughChanged the tracing span kind in the GraphQL pre-handler’s Authenticate flow from SpanKindServer to SpanKindClient. No control-flow, error handling, or API signature changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
Tip 📝 Customizable high-level summaries are now available!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Authenticate middleware stepAuthenticate middleware step
Authenticate middleware stepAuthenticate middleware step
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
Not stale, just pending a review 🙂 |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
@SkArchon bump |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
@Blacksmoke16 Hi, sorry for the delay. I think at minimum we will need some tests to prove that we don't make assumptions on the kind in the control plane. Could you add some relevant tests, please? The WunderGraph Team |
|
@Aenimus I guess one follow-up question: how would you actually write a test for that? If there was a prior assumption I'd have expected some existing test(s) to fail. I can of course write a test that asserts this span's kind is what we expect and that it doesn't affect root span detection or anything tho. The UI just exposes whatever the kind is cosmetically, and ClickHouse views are based on attributes so no change in behavior there either. |
Summary by CodeRabbit
Checklist
Follow up to #456 (comment). It was unexpected for the
Authenticatemiddleware step to have a span kind ofserverdue to this step not representing an incoming remote call. In fact since authentication results in an outgoing HTTP request, it should in fact beclient. It cannot beinternalbecause it's crossing a process boundary (the HTTP request).