open-telemetry / open-telemetry/opentelemetry-ruby
SpanKind immutable to SpanProcessors
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
The SpanKind (span.kind) is inherently considered immutable and only to be set on Span creation.
However a SpanProcessor should be able to essentially perform any kind of change to Spans (especially on the on_start and on_finishing methods).
Currently there is no way to adjust the kind within a Span processor without resulting to unsafe Ruby core functionality (e.g. span.instance_variable_set(:@kind, ::OpenTelemetry::Trace::SpanKind::CONSUMER)). It would be better if there were a dedicated way for a SpanProcessor to adjust the kind.
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 with the SpanKind definition and immutability behavior in sdk/lib/opentelemetry/sdk/trace/span.rb, then inspect the SpanProcessor on_start and on_finishing entry points. Define and implement a supported way for processors to adjust kind without unsafe instance-variable access; done means the behavior is covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100