Plugins: Pass OTEL sampling config to plugins (#76834)

* Pass OTEL sampling config to plugins

* fix capital letters

* Do not pass sampler env vars if sampling is not configured

* Add tests

* PR review feedback

* Simplify tracing env vars logic

* Update test to reflect pkg/infra/tracing behaviour
This commit is contained in:
Giuseppe Guerra
2023-11-10 14:56:08 +01:00
committed by GitHub
parent 68e37c3925
commit 7b4bcc86f1
6 changed files with 194 additions and 36 deletions
+4
View File
@@ -9,6 +9,10 @@ type Tracing struct {
type OpenTelemetryCfg struct {
Address string
Propagation string
Sampler string
SamplerParam float64
SamplerRemoteURL string
}
// IsEnabled returns true if OTLP tracing is enabled (address set)