-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix up otel init #73
fix up otel init #73
Conversation
7f1e7af
to
ef4058e
Compare
df60632
to
59102b6
Compare
internal/node/otel.go
Outdated
conn *grpc.ClientConn, | ||
server *resource.Resource, | ||
) (*sdkTrace.TracerProvider, error) { | ||
if ctx != nil { |
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.
Few questions:
- What's the reasoning behind the 5 sec timeout?
- If the caller supplies a nil ctx, we'll fail to apply the 5 sec timeout to the request. That means request can run indefinitely. Instead, would it be better to return an error if ctx is nil?
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.
1/ I think it's to avoid hanging on the connection request. I think it's unnecessary in most cases, but also a common recommend in example code.
2/ good point. I don't think an error is correct, but I can indeed return.
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.
Sounds good!
ef4058e
to
8cc6a85
Compare
Otel initialization is still somewhat hacky, but we're moving towards a cleaner implementation This change introduces the metrics (aka, meter) producer, and moves all producers (trace, log, metrics) into their own constructor funcs. Next PR will use this provider to implement a metrics api.
59102b6
to
3e1edf0
Compare
Otel initialization is still somewhat hacky, but we're moving towards a cleaner implementation This change introduces the metrics (aka, meter) producer, and moves all producers (trace, log, metrics) into their own constructor funcs.
Next PR will use this provider to implement a metrics api.