2023-03-30 16:31:14 -05:00
|
|
|
package config
|
|
|
|
|
2023-04-05 07:40:08 -05:00
|
|
|
type Tracing struct {
|
|
|
|
OpenTelemetry OpenTelemetryCfg
|
|
|
|
}
|
2023-03-30 16:31:14 -05:00
|
|
|
|
2023-04-05 07:40:08 -05:00
|
|
|
// OpenTelemetryCfg contains the OpenTelemetry address and propagation config values.
|
|
|
|
// This is used to export the OpenTelemetry (OTLP) config without exposing the whole *setting.Cfg.
|
|
|
|
type OpenTelemetryCfg struct {
|
2023-03-30 16:31:14 -05:00
|
|
|
Address string
|
|
|
|
Propagation string
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsEnabled returns true if OTLP tracing is enabled (address set)
|
2023-04-05 07:40:08 -05:00
|
|
|
func (t Tracing) IsEnabled() bool {
|
|
|
|
return t.OpenTelemetry.Address != ""
|
2023-03-30 16:31:14 -05:00
|
|
|
}
|