Skip to content
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

Support decide shouldSample on process end #6609

Open
hmleo opened this issue Jul 30, 2024 · 1 comment
Open

Support decide shouldSample on process end #6609

hmleo opened this issue Jul 30, 2024 · 1 comment
Labels
blocked:spec blocked on open or unresolved spec Feature Request Suggest an idea for this project

Comments

@hmleo
Copy link

hmleo commented Jul 30, 2024

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 ?

@hmleo hmleo added the Feature Request Suggest an idea for this project label Jul 30, 2024
@jack-berg
Copy link
Member

The opentelemetry-java sampler operations are dictated by the specification, which currently only supports head based sampling. This issue requests extending samplers to allow them to be called at different stages in the span life cycle, which I believe is what you're asking for with supporting sampling when a span is completed: open-telemetry/opentelemetry-specification#307

@jack-berg jack-berg added the blocked:spec blocked on open or unresolved spec label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked:spec blocked on open or unresolved spec Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

2 participants