-
Notifications
You must be signed in to change notification settings - Fork 458
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
contrib/zenazn/goji/web: add goji integration #604
Conversation
d55ea4f
to
1587061
Compare
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.
Thanks Kyle! Did you try this out with an actual dummy app and get results in Datadog?
I can't prove it, but the options and test files give me a copy/paste feeling. It's not wrong, but always makes me think if we can do something better to reduce the duplication of both of these (maybe in v2
).
That is correct. This is largely lifted from our
Yes, I did quite a lot of testing with a dummy app trying to improve the middleware and get more detailed traces.
This would be good to do. There are a few integrations that are similar to this ( |
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.
Yes, I did quite a lot of testing with a dummy app trying to improve the middleware and get more detailed traces.
Excellent! 🎉
Left just one comment about a log message. Let me know if it doesn't make sense.
Thanks, @gbbr I added a log message, but didn't mention It's totally reasonable to use our tracing middleware on a sub-Mux, in which case they need to use that Mux's If you think I can word the warning better, I'm open for suggestions. |
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 think your log message is perfect. Just made a small comment on naming. Many times I see sync.Once
variable suffixed with *once
where it makes sense. It makes sense here, I think...
👍 |
@gbbr I just realized that goji has released |
Damn. Great catch! I forgot about this. We definitely should. Otherwise we risk this becoming ambiguous later. |
a9373b9
to
bccd997
Compare
bccd997
to
f541875
Compare
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.
LGTM
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.
👍
This implements middleware for goji that will trace incoming requests.
This implements middleware for goji that will trace incoming requests.
Suggestions for improvements in the implementation are welcome.
Unfortunately it looks like out of the box, there's no easy way to get the route, so the resource will usually be just the method. If the customer uses the Router middleware, that puts the route in the context, which the tracer middleware then picks up and adds to the resource name.