Skip to content
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

Merged
merged 4 commits into from
Feb 22, 2022

Conversation

sgirones
Copy link
Contributor

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 the SpanStatusFromHTTPStatusCodeAndSpanKind so the status code is treated different depending on whether the SpanKind is server or not

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 19, 2022

CLA Signed

The committers are authorized under a signed CLA.

@pellared
Copy link
Member

Hello @sgirones 👋
Are you able to sign the CLA so that we can accept your contribution?

@pellared pellared added the blocked: CLA Waiting on CLA to be signed before progress can be made label Feb 20, 2022
@sgirones
Copy link
Contributor Author

@pellared done!

@pellared pellared removed the blocked: CLA Waiting on CLA to be signed before progress can be made label Feb 21, 2022
@pellared
Copy link
Member

I think it is worth adding an entry to CHANGELOG.md

@codecov
Copy link

codecov bot commented Feb 21, 2022

Codecov Report

Merging #1848 (776e21c) into main (7b00c22) will not change coverage.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #1848   +/-   ##
=====================================
  Coverage   69.6%   69.6%           
=====================================
  Files        127     127           
  Lines       5391    5391           
=====================================
  Hits        3755    3755           
  Misses      1498    1498           
  Partials     138     138           
Impacted Files Coverage Δ
...entation/github.com/labstack/echo/otelecho/echo.go 95.0% <100.0%> (ø)

@sgirones
Copy link
Contributor Author

Thanks for the hand-holding @pellared. I added a changelog line.

Let me know if I there's anything missing I can help with.

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@Aneurysm9 Aneurysm9 merged commit 82694ba into open-telemetry:main Feb 22, 2022
@sgirones sgirones deleted the patch-1 branch February 23, 2022 07:40
@MrAlias MrAlias mentioned this pull request Mar 16, 2022
@pellared pellared added this to the untracked milestone Nov 8, 2024
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.

4 participants