-
Notifications
You must be signed in to change notification settings - Fork 576
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
feat: Add integration for github.com/astaxie/beego #200
feat: Add integration for github.com/astaxie/beego #200
Conversation
0e48005
to
43ff4d2
Compare
2287d63
to
37b2076
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.
💯
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.
The approach looks good, especially the testing, well done. Had some minor comments/suggestions around naming and docs.
@reggiemcdonald can you add a |
github.com/astaxie/beego
IntegrationDescription
This PR provides beego instrumentation.
Implementation
This integration makes use of the
net/http
integration to provide tracing to HTTP requests.HTTP requests to the beego app running this middleware will be traced.
The following options are provided:
WithTracer(trace.Tracer)
WithMeter(metric.Meter)
WithPropagators(propagation.Propagators)
WithFilter(Filter)
WithSpanNameFormatter(Formatter)
which allows users to specify the tracer, meter and propagators to be used. In accordance with the semantic conventions, span names are generated from the path of the HTTP request by default. Users are able to override this behaviour with the provided
WithSpanNameFormatter
option.WithFilter
allows users to filter out which requests should be traced.Additionally, Beego supports HTML template rendering using calls to
beego.Controller.Render
. This instrumentation provides a wrapper function to add a child span to the rendering of the template files.A dockerized example can be found here. In an effort to keep this PR shorter, I've decided to move the example to a separate PR, which I'll open once this gets merged.
TODOAddresses: #82
/cc @nlehrer @danherr