mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-05-08 02:49:17 -05:00
chore: more visibility and debug lines for queues (#836)
* chore: more visibility and debug options for queues * better debug lines on queue repo * don't log so much in load test
This commit is contained in:
@@ -45,6 +45,8 @@ type ServerConfigFile struct {
|
||||
|
||||
Logger shared.LoggerConfigFile `mapstructure:"logger" json:"logger,omitempty"`
|
||||
|
||||
AdditionalLoggers ConfigFileAdditionalLoggers `mapstructure:"additionalLoggers" json:"additionalLoggers,omitempty"`
|
||||
|
||||
OpenTelemetry shared.OpenTelemetryConfigFile `mapstructure:"otel" json:"otel,omitempty"`
|
||||
|
||||
SecurityCheck SecurityCheckConfigFile `mapstructure:"securityCheck" json:"securityCheck,omitempty"`
|
||||
@@ -54,6 +56,14 @@ type ServerConfigFile struct {
|
||||
Email ConfigFileEmail `mapstructure:"email" json:"email,omitempty"`
|
||||
}
|
||||
|
||||
type ConfigFileAdditionalLoggers struct {
|
||||
// Queue is a custom logger config for the queue service
|
||||
Queue shared.LoggerConfigFile `mapstructure:"queue" json:"queue,omitempty"`
|
||||
|
||||
// PgxStats is a custom logger config for the pgx stats service
|
||||
PgxStats shared.LoggerConfigFile `mapstructure:"pgxStats" json:"pgxStats,omitempty"`
|
||||
}
|
||||
|
||||
// General server runtime options
|
||||
type ConfigFileRuntime struct {
|
||||
// Port is the port that the core server listens on
|
||||
@@ -339,6 +349,8 @@ type ServerConfig struct {
|
||||
|
||||
Logger *zerolog.Logger
|
||||
|
||||
AdditionalLoggers ConfigFileAdditionalLoggers
|
||||
|
||||
TLSConfig *tls.Config
|
||||
|
||||
SessionStore *cookie.UserSessionStore
|
||||
@@ -480,6 +492,12 @@ func BindAllEnv(v *viper.Viper) {
|
||||
_ = v.BindEnv("logger.level", "SERVER_LOGGER_LEVEL")
|
||||
_ = v.BindEnv("logger.format", "SERVER_LOGGER_FORMAT")
|
||||
|
||||
// additional logger options
|
||||
_ = v.BindEnv("additionalLoggers.queue.level", "SERVER_ADDITIONAL_LOGGERS_QUEUE_LEVEL")
|
||||
_ = v.BindEnv("additionalLoggers.queue.format", "SERVER_ADDITIONAL_LOGGERS_QUEUE_FORMAT")
|
||||
_ = v.BindEnv("additionalLoggers.pgxStats.level", "SERVER_ADDITIONAL_LOGGERS_PGXSTATS_LEVEL")
|
||||
_ = v.BindEnv("additionalLoggers.pgxStats.format", "SERVER_ADDITIONAL_LOGGERS_PGXSTATS_FORMAT")
|
||||
|
||||
// otel options
|
||||
_ = v.BindEnv("otel.serviceName", "SERVER_OTEL_SERVICE_NAME")
|
||||
_ = v.BindEnv("otel.collectorURL", "SERVER_OTEL_COLLECTOR_URL")
|
||||
|
||||
Reference in New Issue
Block a user