Open 1pkg opened 1 month ago
Pinging @elastic/elastic-agent (Team:Elastic-Agent)
@1pkg Could you provide a sample configuration you would like elastic-agent to support?
There's also something else that is unclear: is tracing sampling a setting on the APM agent side or APM server side? I assume you already know that all the components running under elastic-agent will receive the same settings if those are added to APM tracing config
/cc @ycombinator
@pchila sorry for the confusing sampling link in the description, what we really need is an additional config property in APM tracing config so we can control self-tracing head-based sampling rate.
A hypothetical configuration can look like this in yaml:
agent:
monitoring:
enabled: true
traces: true
apm:
environment: test
global_labels:
k1: v1
k2: v2
sampling_rate: 0.2 # new property
@1pkg thanks for the clarification :) Is sampling rate an optional config or will it be always set along with the other properties ?
@pchila, I'd say sampling_rate
should be an optional field - yes, with a value in the range of [0.0, 1.0]. On our end if sampling rate is set, we'll then apply ratio sampler in the self-instrumentation tracer.
Describe the enhancement:
APM tracing config should additionally include a section for trace sampling to enable APM Server monitoring be configured with custom sampling rate when managed by Elastic Agent.
Describe a specific use case for the enhancement or feature:
Allow to specify a custom trace sampling rate to control the ingestion rate when self monitoring running APM Server.
What is the definition of done?
The custom sampling APM config section is handled correctly and used to configure tracing in APM Server.