Skip to content
This repository has been archived by the owner on Jun 5, 2022. It is now read-only.

Commit

Permalink
feat: 4xx http error no longer act as errors (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
psmarcin authored Dec 14, 2021
1 parent b7b33cf commit 4885a64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/fiber-otel/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func New(config ...Config) fiber.Handler {

statusCode := c.Response().StatusCode()
attrs := semconv.HTTPAttributesFromHTTPStatusCode(statusCode)
spanStatus, spanMessage := semconv.SpanStatusFromHTTPStatusCode(statusCode)
spanStatus, spanMessage := semconv.SpanStatusFromHTTPStatusCodeAndSpanKind(statusCode, trace.SpanKindServer)
span.SetAttributes(attrs...)
span.SetStatus(spanStatus, spanMessage)

Expand Down

0 comments on commit 4885a64

Please sign in to comment.