-
Notifications
You must be signed in to change notification settings - Fork 9
trace requests per route #189
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
Conversation
ok I tested this out with cert-store and it did what I wanted. Take a look here. The thing that is "fixed" is that the endpoints are now not just GET or PUT. They're now I am going to check the behavior to make sure that I can do the other way |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement!
How about splitting the method from the resource name a bit more clearly? From bitballoon's APM, it looks like they maintain case, so maybe some variant of: GET-resourcename
, GET resourcename
, GET::resourcename
@mheffner -- yeah that works for me. I went with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the LD change required for this or just trying to make it less noisy?
Not necessary - I am actually considering moving it to a separate PR but
wanted to see what the whole experience would be.
…On Wed, Oct 7, 2020 at 10:04 AM Mike Heffner ***@***.***> wrote:
***@***.**** approved this pull request.
Was the LD change required for this or just trying to make it less noisy?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#189 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADDG2FAJMBB4PJZWP3WFCTSJSNRFANCNFSM4SBCBRIA>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good 💃
} | ||
default: | ||
// this is 5ns slower than using unsafe but a unhandled internal server error should not happen that often | ||
if reflect.ValueOf(err).IsNil() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does moving this up to the top add latency we should be concerned about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Also in the error cases I'm generally less worried about latency, everything is screwed already 😂
Essentially when I was looking at the tracing in cert-store (and others) all requests for the different routes are under 1 header ("GET" or "PUT") which make it really hard to figure out what's going on. This is an attempt to break that up into per pattern routes.
I figured that I'd have to ditch the middleware approach because it doesn't have the context to know what path it is. If we use the path from the request itself, we're going to get a huge number and they won't aggregate. Sooo this is my compromise.
It is a breaking change in that it changes the behaviour. I added the
TraceAllRequests
to the router's middleware if people want to upgrade but not change functionality. I will have to test that out though. It is also breaking in the API in that theNewTracer
andWrapWithSpan
now take aresource
. I searched GH in the org and couldn't find any references to those methods outside of commons.My plan is to:
If anyone sees a way that is less hackey to get this to work please let me know.