-
Notifications
You must be signed in to change notification settings - Fork 83
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
Pass telemetry directly to the Controller
#1248
Conversation
Do not enqueue telemetry to a channel just to dequeue it and send it to the Controller.
Syntactic sugar for: var kvs []attribute.KeyValue kvs = appendAttrs(kvs, ptraceAttributeMap)
Use TracerProvider.Tracer directly instead of caching Tracers in the Controller. The API ensures that TracerProvider.Tracer is concurrent safe and the default SDK already handles the caching of Tracers (no need to duplicate that logic here).
fed3782
to
c12d04c
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, just curious @MrAlias could you explain more what you did to make the controller concurrent-safe?
The controller's The default implementation of the SDK already provides a concurrent-safe cached lookup of a |
912dc2d
to
f02332f
Compare
Do not enqueue telemetry to a channel just to dequeue it and send it to the
Controller
.This requires that the
Controller.Trace
method is concurrent safe. TheController
is updated and tests are added to ensure this is the case.Benchmark