open-telemetry / open-telemetry/opentelemetry-java

Support decide shouldSample on process end

Open
#6,609 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blocked:spec Feature Request
Dominant language
Java
Stars
2.5k
Forks
1k
Avg merge
3d 17h
Merged PRs (30d)
58

Description

In the current header sampling mechanism, the samplingResult is depend on Instrumenter.start(), such as parent or traceIdRatio.

When the samplingResult create ends, there may be an invocation exception in instrument target method, and exception is usually the information we focus on. We want to be able to find this kind of focused span during the span process and then decide whether to sample it or not.

Of course, we can also realize our demands in the tail sampling mode, but it must be 100% sampled in the head, which will cause an increase in resource consumption to a certain extent.

So, can it support decide sample on proccess end ?

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 reading the Instrumenter.start() sampling flow and tracing how samplingResult is created and finalized during span processing. Determine the API and lifecycle changes needed to decide sampling at process end, including invocation exceptions, and define completion with tests or documentation for the expected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
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.