-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmonitoring.go
More file actions
19 lines (16 loc) · 621 Bytes
/
Copy pathmonitoring.go
File metadata and controls
19 lines (16 loc) · 621 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package main
import (
libpack_monitoring "github.com/lukaszraczylo/graphql-monitoring-proxy/monitoring"
)
// StartMonitoringServer initializes and starts the monitoring server.
func StartMonitoringServer() error {
cfg.Monitoring = libpack_monitoring.NewMonitoring(&libpack_monitoring.InitConfig{
PurgeOnCrawl: cfg.Server.PurgeOnCrawl,
PurgeEvery: cfg.Server.PurgeEvery,
})
cfg.Monitoring.AddMetricsPrefix("graphql_proxy")
cfg.Monitoring.RegisterDefaultMetrics()
// Currently, the monitoring server initialization doesn't throw errors,
// but we return nil to maintain the interface contract
return nil
}