Formalize Memory Monitoring

by extracting the interval and threshold into configuration options.

Related to f670b07e.
This commit is contained in:
Maximilian Paß
2023-10-06 14:50:14 +02:00
parent ca42369057
commit 14b012486d
3 changed files with 31 additions and 16 deletions

View File

@ -55,6 +55,9 @@ var (
Level: "INFO",
Formatter: dto.FormatterText,
},
Profiling: Profiling{
MemoryThreshold: 1_000,
},
Sentry: sentry.ClientOptions{
AttachStacktrace: true,
},
@ -130,8 +133,10 @@ type Logger struct {
// Profiling configures the usage of a runtime profiler to create optimized binaries.
type Profiling struct {
Enabled bool
File string
CPUEnabled bool
CPUFile string
MemoryInterval uint
MemoryThreshold uint
}
// InfluxDB configures the usage of an Influx db monitoring.