drogue-iot / drogue-cloud

Cloud Native IoT
https://drogue.io
Apache License 2.0
114 stars 30 forks source link

Provide a way to configure the tracing sampler #230

Closed ctron closed 2 years ago

ctron commented 2 years ago

By default the tracing configuration from OpenTelemetry configures a 100% ratio sampler. This causes quite an overload. However, it is not configurable.

In order to remove stress from the system we overwrite the hard-coded 100% sampler with a 1% sampler. We must make this configurable for the 0.9 release.

Ideally, this should use the Jaeger remote configuration. However that currently seems unsupported: https://github.com/open-telemetry/opentelemetry-rust/issues/606

At least should we read the configuration according to spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#general-sdk-configuration

Even better would be, to bring this configuration upstream: https://github.com/open-telemetry/opentelemetry-rust