Skip to content

Error span on 5xx only#8033

Merged
traefiker merged 2 commits intotraefik:v2.4from
kvncrw:error_span_on_5xx_only
Apr 14, 2021
Merged

Error span on 5xx only#8033
traefiker merged 2 commits intotraefik:v2.4from
kvncrw:error_span_on_5xx_only

Conversation

@kvncrw
Copy link
Contributor

@kvncrw kvncrw commented Apr 5, 2021

What does this PR do?

Generates error spans on 5xx errors rather than >= 400 errors.

Motivation

A client generating hundreds of 401s every few minutes.

Generating error spans for client-side errors creates a lot of noise on high-volume systems when the problem is not addressable by the server operator.

Most tracers implement similar logic, only generating an error when the response code is 500 or greater. Examples:

https://github.com/opentracing-contrib/go-stdlib/blob/v1.0.0/nethttp/client.go#L191-L193
https://github.com/opentracing-contrib/nginx-opentracing/blob/v0.14.0/opentracing/src/request_tracing.cpp#L64-L67

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

Copy link
Contributor

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
:shipit:

Copy link
Collaborator

@SantoDE SantoDE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👼

@ldez ldez added this to the 2.4 milestone Apr 7, 2021
Copy link
Collaborator

@jbdoumenjou jbdoumenjou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

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.

6 participants