-
Notifications
You must be signed in to change notification settings - Fork 563
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
[otelecho] Use SpanStatusFromHTTPStatusCodeAndSpanKind on the middleware #1848
Conversation
|
Hello @sgirones 👋 |
@pellared done! |
I think it is worth adding an entry to |
Codecov Report
@@ Coverage Diff @@
## main #1848 +/- ##
=====================================
Coverage 69.6% 69.6%
=====================================
Files 127 127
Lines 5391 5391
=====================================
Hits 3755 3755
Misses 1498 1498
Partials 138 138
|
Thanks for the hand-holding @pellared. I added a changelog line. Let me know if I there's anything missing I can help with. |
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Fix the
otelecho
middleware and follow the OpenTelemetry specification.For servers, 4XX status codes must not be treated as errors. OpenTelemetry's
semconv
package provides theSpanStatusFromHTTPStatusCodeAndSpanKind
so the status code is treated different depending on whether theSpanKind
isserver
or not