Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
add otel tracing support #182
add otel tracing support #182
Changes from all commits
9dabb54
dabb278
cab7923
c97556c
49fc649
046ad35
87d8cb3
827e13e
957d4cd
c0064a3
9fa8259
97baa63
97e7d5f
735aebf
bbee58b
11de058
5867c7b
a9e18c2
27b0b86
3038196
6cc6cea
a5fa1ad
deb950b
a1aa8e8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
For reviewers: compared to APM this is missing "span type" information, but to my understanding this is delegated to an eventual otel<>Elastic APM bridge so is not a concern here.
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.
For reviewers: A otel zap bridge exists at https://github.com/uptrace/opentelemetry-go-extra/tree/main/otelzap
This implementation is not compatible with a standard zap logger though, as it wraps the logger in a custom
otelzap.Logger
type. Passing the context also requires to use an additional.Ctx(ctx)
call that is not supported byzap.Logger
.Due to this I chose not to use it an instead provide correlation information as standard otel attributes. I expect this to retain the same behaviour that we get with
logger.With(apmzap.TraceContext(ctx)...)
on line 320.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'm tempted to add a deprecation notice to this, WDYT?
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 agree, done in
a5fa1ad
(#182)