diff --git a/config/introspection.go b/config/introspection.go index 7eabddf39a..69c0f6c700 100644 --- a/config/introspection.go +++ b/config/introspection.go @@ -10,12 +10,14 @@ type Trace struct { Probability *float64 `yaml:"probability,omitempty" json:"probability,omitempty"` Jaeger Jaeger `yaml:"jaeger,omitempty" json:"jaeger,omitempty"` OTLP TraceOTLP `yaml:"otlp,omitempty" json:"otlp,omitempty"` + Sentry Sentry `yaml:"sentry,omitempty" json:"sentry,omitempty"` } func (t *Trace) lint() ([]Warning, error) { switch t.Name { case "": case "otlp": + case "sentry": case "jaeger": return []Warning{{ path: ".name", @@ -50,6 +52,17 @@ type Jaeger struct { BufferMax int `yaml:"buffer_max,omitempty" json:"buffer_max,omitempty"` } +// Sentry is the [Sentry] specific tracing configuration. +// +// [Sentry]: https://sentry.io +type Sentry struct { + // DSN to be passed to [github.com/getsentry/sentry-go.ClientOptions.Dsn]. + DSN string `yaml:"dsn" json:"dsn"` + // Environment to be passed to + // [github.com/getsentry/sentry-go.ClientOptions.Environment]. + Environment string `yaml:"environment,omitempty" json:"environment,omitempty"` +} + // Metrics specifies how to configure Clair's metrics exporting. // // The "Name" key must match the provider to use.