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

Finch: Sets the trace status to error on any 5xx response #258

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jeffutter
Copy link
Contributor

@jeffutter jeffutter commented Jan 23, 2024

According to the Semantic Conventions any trace for a 5xx response should mark the trace with status: :error. Previously they were not marked as error unless the client throws an error without reaching the server (timeout, connection refused, etc.)

Copy link

linux-foundation-easycla bot commented Jan 23, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

According to the [Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status)
any trace for a 5xx response should mark the trace with `status:
:error`. Previously they were not marked as error unless the client
throws an error without reaching the server (timeout, connection
refused, etc.)

Also added a helper to
`utilities/opentelemetry_instrumentation_http/src` to convert the http
status codes to binaries to add as the details on the error trace.
…escription

As per conventions:

> Don’t set the span status description if the reason can be inferred from
> http.response.status_code.

So we can skip setting the status reason when it's based on HTTP code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants