Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: add Sentry #1895

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"`
crozzy marked this conversation as resolved.
Show resolved Hide resolved
}

// Metrics specifies how to configure Clair's metrics exporting.
//
// The "Name" key must match the provider to use.
Expand Down
Loading