typelevel / typelevel/otel4s

Security of ending spans

Open
#347 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tracing
Dominant language
Scala
Stars
215
Forks
49
Avg merge
2d 5h
Merged PRs (30d)
17

Description

Currently, all spans expose end methods, allowing even users of managed spans to end them prematurely and potentially cause problems. Additionally, if we end up exposing the current span in Tracer, arbitrary callers may be able to end spans prematurely. Should the API be changed to prevent users other than callers of startUnmanaged from calling end on a span?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the span API, startUnmanaged, and Tracer's possible current-span exposure. Determine how the API should prevent premature end calls while preserving unmanaged-span callers; done when the ownership rules and resulting behavior are clearly specified and validated by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.