open-telemetry / open-telemetry/opentelemetry-java
Alternative OpenCensus shim implementation proposal
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 58
Description
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:
- The OpenCensus.Tracer will be a simple wrapper of the OpenTelemetry.Tracer with a name "opencensus".
- The
PropagationComponentcan 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). - The clock does not need to be re-implemented. just return the Millis clock.
- The
ExporterComponentcan be implemented by wrapping the BatchSpanProcessor, the OpenCensus.SpanExporter.Handler is equivalent with the OpenTelemetry.SpanExporter - The
TraceConfigis 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing implementation in opencensus-shim and compare it with the two proposals in the issue. Determine which proposal is viable and what compatibility constraints apply; done requires an agreed design before implementation can be scoped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100