The changes to support configurable sampling rate for APMConfig in https://github.com/elastic/elastic-agent-client/pull/123 seem to now work as expected. During the course of integrating the change to APM Server in PR, I discovered that sampling_rate is formatted as a binary (hex) with exponent instead of decimal literal without exponent, this breaks subsequent call in apm-agent-go when tracer is initialized via ELASTIC_APM_TRANSACTION_SAMPLE_RATE with a custom sampling rate.
A quick stripped down go playground snippet with the problem.
Steps to Reproduce
On the latest agent build set non empty value to agent.monitoring.apm.sampling_rate for example "0.1".
Description
The changes to support configurable sampling rate for APMConfig in https://github.com/elastic/elastic-agent-client/pull/123 seem to now work as expected. During the course of integrating the change to APM Server in PR, I discovered that
sampling_rate
is formatted as a binary (hex) with exponent instead of decimal literal without exponent, this breaks subsequent call in apm-agent-go when tracer is initialized viaELASTIC_APM_TRANSACTION_SAMPLE_RATE
with a custom sampling rate.A quick stripped down go playground snippet with the problem.
Steps to Reproduce
On the latest agent build set non empty value to
agent.monitoring.apm.sampling_rate
for example "0.1".Related Issues