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

Unrecorded traces and spans are fully processed by the module #136

Open
manikmagar opened this issue Jan 1, 2024 · 0 comments
Open

Unrecorded traces and spans are fully processed by the module #136

manikmagar opened this issue Jan 1, 2024 · 0 comments

Comments

@manikmagar
Copy link
Contributor

manikmagar commented Jan 1, 2024

Module by default records 100% of the traces and spans. This may not be needed all the time and can be controlled with trace sampling.

It is possible to use Sampler properties of the OpenTelemetry SDK to configure Head Sampling with Consistent Probability Sampling.

If it is configured to use traceid ratio based sampling eg. otel.traces.sampler= parentbased_traceidratio, otel.traces.sampler.arg=0.1, SDK will only record 01 i.e. 10% of the traces. Although 90% of the traces are not recorded, this module is still performing a full processing of trace and span data for unrecorded traces. This is an un-necessary overhead and must be avoided.

When using head sampling, the recording decision is made when starting a span. So it should be using to decided if further processing of any related spans and traces are needed or not. Honoring the recording flags can help reduce the processing load and improve the performance, if needed.

@manikmagar manikmagar added this to the 1.5.0 milestone Jan 2, 2024
@manikmagar manikmagar modified the milestones: 1.5.0, 1.6.0 Jan 11, 2024
@manikmagar manikmagar removed this from the 1.6.0 milestone Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant