prometheus metrics server
All checks were successful
/ Make image (push) Successful in 49s

This commit is contained in:
nquidox 2026-02-17 12:19:47 +03:00
parent 1a90f1e605
commit 4665c90c2c
4 changed files with 97 additions and 0 deletions

View file

@ -14,6 +14,7 @@ type Config struct {
GrpcCfg GrpcConfig
OriginEnabled OriginEnabled
ExternalBrowser string
Metrics MetricsConfig
}
type GrpcConfig struct {
@ -36,6 +37,12 @@ type OriginEnabled struct {
Amiami bool
}
type MetricsConfig struct {
Host string
Port string
GinMode string
}
func NewConfig() *Config {
return &Config{
LogLevel: getEnv("APP_LOG_LEVEL", "debug"),
@ -62,6 +69,12 @@ func NewConfig() *Config {
Mandarake: getEnvBool("ORIGIN_MANDARAKE_ENABLED", false),
Amiami: getEnvBool("ORIGIN_AMIAMI_ENABLED", false),
},
Metrics: MetricsConfig{
Host: getEnv("METRICS_HOST", "0.0.0.0"),
Port: getEnv("METRICS_PORT", "49060"),
GinMode: getEnv("METRICS_GIN_MODE", "dev"),
},
}
}