Issue 1230 OpenTelemetry Java Auto-Instrumentation Integration#1233
Issue 1230 OpenTelemetry Java Auto-Instrumentation Integration#1233markxnelson merged 1 commit intomainfrom
Conversation
| - baggage | ||
| - b3 | ||
| sampler: | ||
| type: always_on |
There was a problem hiding this comment.
always_on is probably not a good production choice? IDK.
AI suggests:
parentbased_traceidratio
Most common production choice
Respects parent sampling decisions; applies ratio sampling when there's no parent
Example: parentbased_traceidratio:0.1 = sample ~10% of root spans, propagate that decision downstream
Maybe make it into a param for the end user to choose the right sampler type and ratio?
There was a problem hiding this comment.
configure parent-based ratio sampler for opentelemetry auto-instrumentation
Done
The Instrumentation Custom Resource (which contains that parentbased_traceidratio setting) is managed by the central obaas platform Helm chart that you deploy into the tenant namespace.
So, when the platform administrator deploys the OBaaS environment for a tenant (e.g., prod vs. dev), they control the sampling rate for the entire namespace at once by overriding the values during the helm install obaas command.
They would just provide a custom namespace-values.yaml file like this:
yaml
namespace-values.yaml overrides for Production
signoz:
instrumentation:
sampler:
type: "parentbased_traceidratio"
# Only sample 5% of new traces in Production to save storage/bandwidth
argument: "0.05"
Then deploy the platform:
bash
helm upgrade -i obaas -n prod-tenant -f namespace-values.yaml infra-charts/obaas
When you deploy your customer-helidon microservice (and all other microservices) into that prod-tenant namespace, the OpenTelemetry Operator will automatically inject them using that 5% ratio.
The individual application developers don't have to fiddle with tracing ratios at all—it's managed entirely as infrastructure policy!
There was a problem hiding this comment.
What's the default value? And I think always_on is good for dev/test?
There was a problem hiding this comment.
instrumentation:
sampler:
# e.g. parentbased_traceidratio, always_on, always_off
# Using parentbased_traceidratio ensures distributed traces are kept intact
type: "parentbased_traceidratio"
# Only applies if using a ratio sampler. 1.0 = 100%, 0.1 = 10%
argument: "1.0"
as seen in values.yaml
There was a problem hiding this comment.
Lets see if I can do this properly. @andytael
The Instrumentation Custom Resource (which contains that parentbased_traceidratio setting) is managed by the central obaas platform Helm chart that you deploy into the tenant namespace.
So, when the platform administrator deploys the OBaaS environment for a tenant (e.g., prod vs. dev), they control the sampling rate for the entire namespace at once by overriding the values during the helm install obaas command.
They would just provide a custom namespace-values.yaml file like this:
# namespace-values.yaml overrides for Production
signoz:
instrumentation:
sampler:
type: "parentbased_traceidratio"
# Only sample 5% of new traces in Production to save storage/bandwidth
argument: "0.05"
Then deploy the platform:
helm upgrade -i obaas -n prod-tenant -f namespace-values.yaml infra-charts/obaas
When you deploy microservices into that prod-tenant namespace, the OpenTelemetry Operator will automatically inject them using that 5% ratio.
The individual application developers don't have to fiddle with tracing ratios at all—it's managed entirely as infrastructure policy!
934ebba to
788e9d6
Compare
Add OpenTelemetry Operator to prerequisites