Skip to content

Commit

Permalink
config: add Sentry config
Browse files Browse the repository at this point in the history
Signed-off-by: Hank Donnay <[email protected]>
  • Loading branch information
hdonnay committed Nov 13, 2023
1 parent 4a84b94 commit 3621037
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions config/introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 3621037

Please sign in to comment.