-
Notifications
You must be signed in to change notification settings - Fork 848
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
Alternative OpenCensus shim implementation proposal #2013
Comments
Also the ContextManager will redirect into the OpenTelemetry.Context which we will need to configure to be using as otelInGRPC, because OpenCensus users delegate the context propagation to gRPC Context. |
Alternative to for example wrapping the ExporterComponent is to tell users to configure an OTel exporter. This can simplify the implementation. |
This is what we'd prefer I think, as this helps to avoid duplicate OC and OT spans being exported in case both OC and OT pipelines are configured in the application. Current shim implementation configures OC Tracer with no-op exporter, so we can probably do the same. |
We may still want to offer user an alternative to the RunningSpanStore option which can be extracted from the current OTel zpages and offer as a SpanProcessor. |
@jsuereth do you think this is still relevant? |
The current OpenCensus shim is implemented here:
https://github.com/open-telemetry/opentelemetry-java/tree/master/opencensus-shim
This implementation has some disadvantages regarding the requirement to use a cache of Spans, spans need to be ended in a certain amount of time, etc. Right now the current approach is to rely on the opencensus-impl to do the work of accumulating events into Spans, export, etc.
First Proposal
The proposal is to make the shim rely on the opentelemetry-sdk to do the heavy work of accumulating events into Spans, export them, etc.
This way you will benefit of the fact that this project is currently very active and maintained, and also I believe this will simplify the implementation, here are some thoughts:
PropagationComponent
can be implemented by wrapping the propagators from OpenTelemetry (w3c, b3). One small problem is that you will need to re-implement theBinaryFormat
(this is most likely a duplicate code).ExporterComponent
can be implemented by wrapping the BatchSpanProcessor, the OpenCensus.SpanExporter.Handler is equivalent with the OpenTelemetry.SpanExporterTraceConfig
is a simple wrapper of the config management in the OpenTelemetry.Second Proposal
Take a dependency on otel api in the opencensus API and redirect all calls. This may not be possible until GA.
The text was updated successfully, but these errors were encountered: