Closed ArjunVachhani closed 1 week ago
Hi @ArjunVachhani,
We have a few environment variables that control sampling:
DD_TRACE_SAMPLE_RATE
sets the global sampling rate for traces
DD_TRACE_SAMPLING_RULES
defines sampling rules by service
for traces.
DD_SPAN_SAMPLING_RULES
defines sampling for specific spans within traces that are kept.
I don't see anything that would explain why your defined sampling rules isn't taking effect, so I think we'd need more information.
To help expedite a solution for you, could you please open a new ticket for Datadog Support (no sign-in required) for the .NET Tracer for this issue? This will allow our support team to collect necessary information and prioritize work on this. Here is a direct link to create a new ticket for the .NET Tracer: https://help.datadoghq.com/hc/requests/new?tf_1260824651490=pt_product_type:apm&tf_1900004146284=pt_apm_language:.net
I am developing a microservice using ASP.NET Core. We are using Datadog.Tracer library for distributed traces & span. Currently it is collecting all the spans and traces. I only want 1% of spans to be collected and ingested. I am setting below environment variables, but it is not having any effect.
DD_TRACE_SAMPLE_RATE: "0.01" DD_SPAN_SAMPLING_RULES: '[{"sample_rate":0.01,"service":"*","name":"*"}]' Why it is not sampling spans? What am I missing?