Labstack Echo v4: Allow ignoring trace using the response #3341
Closed
rafaeljusto
started this conversation in
Feature Request
Replies: 2 comments
-
This is the same as |
Beta Was this translation helpful? Give feedback.
0 replies
-
For those looking for a solution, I ended up following @mtoffl01 suggestion and using tracer.Start(
tracer.WithSamplingRules([]tracer.SamplingRule{
{
Tags: map[string]*regexp.Regexp{
ext.HTTPCode: re503,
},
Rate: 0.0,
},
}),
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Package Name
contrib/labstack/echo.v4
Package Version(s)
1.72.2
Describe the feature you'd like
Add the
WithIgnoreResponse
option in the Labstack Echo v4 middleware:Is your feature request related to a problem?
Yes, I need to ignore traces when a specific endpoint responds with a Service Unavailable (503) status.
Describe alternatives you've considered
The existing
WithIgnoreRequest
won't contain the response status code since it's checked before the underlying controller is executed. The other useful ones, such asWithStatusCheck
andWithErrorCheck
, don't have the Echo context to identify the request path and the response status code.Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions