feat: sentry integration
All checks were successful
arcad/emissary/pipeline/head This commit looks good

This commit is contained in:
2023-10-13 12:30:52 +02:00
parent 9068203e71
commit e756a60373
27 changed files with 272 additions and 67 deletions

View File

@ -11,6 +11,7 @@ import (
// Config definition
type Config struct {
Logger LoggerConfig `yaml:"logger"`
Sentry SentryConfig `yaml:"sentry"`
Server ServerConfig `yaml:"server"`
Agent AgentConfig `yaml:"agent"`
}
@ -44,6 +45,7 @@ func NewDefault() *Config {
Logger: NewDefaultLoggerConfig(),
Agent: NewDefaultAgentConfig(),
Server: NewDefaultServerConfig(),
Sentry: NewDefaultSentryConfig(),
}
}

18
internal/config/sentry.go Normal file
View File

@ -0,0 +1,18 @@
package config
import (
"os"
)
type SentryConfig struct {
DSN InterpolatedString `yaml:"dsn"`
Environment InterpolatedString `yaml:"environment"`
}
func NewDefaultSentryConfig() SentryConfig {
hostname, _ := os.Hostname()
return SentryConfig{
DSN: "",
Environment: InterpolatedString(hostname),
}
}