-
Notifications
You must be signed in to change notification settings - Fork 113
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
Tracing improvements #2962
Tracing improvements #2962
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
Create separate TracerProviders per service to improve tracing when running multiple services in a single process (like e.g. ocis does). Previously all service were referring to the same package-level TracerProvider (which, among other things, caused the services to overwrite each others services names). We still create a "global" TracerProvider to cover the cases where we don't have access to the per service Provider yet. This will be improved in a follow up change.
To generate more useful tracing (especially when running multiple services in a single process) we'd like to generate Tracers from the per service TracerProvider() instead of the global default provider. Therefore we now pass the TracerProvider via context (similar to what is already done for the logger.
I must admit I am not really sure about the whole change (especially the second commit in the PR). I am not a fan of attaching this kind of stuff to the context. I think ideally we would instantiate a tracer per "sub"-service at startup and utilized that. (That would however require quite a bit of rework I fear) |
To be really useful with ocis theres also a small change required on the ocis side to initialize the DefaultTracerProvider: owncloud/ocis@master...rhafer:tracing |
Create separate TracerProviders per service to improve tracing when
running multiple services in a single process (like e.g. ocis does).
Previously all service were referring to the same package-level
TracerProvider (which, among other things, caused the services to
overwrite each others services names).
We still create a "global" TracerProvider to cover the cases where
we don't have access to the per service Provider yet. This will be
improved in a follow up change.