This project delivers an OpenTelemetry Java Agent extension with a dynamically configurable sampler, along with the optional REST service for configuring it.
Apache License 2.0
12
stars
1
forks
source link
Return a better error message when JSON parsing fails #32
The problem here is that parentbased_alwaysoff is not a legal sampler. The service actually logs this, but the message is not relayed to the client, which should include the actual JSON Parse error: JSON parse error: Cannot deserialize value of type "no.domstol.otel.agent.service.AgentConfiguration$SamplerType" from String "parentbased_alwaysoff": not one of the values accepted for Enum class: [parentbased_traceidratio, parentbased_always_off, parentbased_always_on, traceidratio, always_on, always_off]]
Calling for example:
Returns:
The problem here is that
parentbased_alwaysoff
is not a legal sampler. The service actually logs this, but the message is not relayed to the client, which should include the actual JSON Parse error:JSON parse error: Cannot deserialize value of type "no.domstol.otel.agent.service.AgentConfiguration$SamplerType" from String "parentbased_alwaysoff": not one of the values accepted for Enum class: [parentbased_traceidratio, parentbased_always_off, parentbased_always_on, traceidratio, always_on, always_off]]