1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-11-29 23:07:40 +02:00

Add CloudWatch metrics

This commit is contained in:
DarthSim
2022-12-04 21:01:37 +06:00
parent bf472d3df9
commit 79e473798d
4 changed files with 278 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ import (
"github.com/imgproxy/imgproxy/v3/ierrors"
"github.com/imgproxy/imgproxy/v3/imagedata"
"github.com/imgproxy/imgproxy/v3/imagetype"
"github.com/imgproxy/imgproxy/v3/metrics/cloudwatch"
"github.com/imgproxy/imgproxy/v3/metrics/datadog"
"github.com/imgproxy/imgproxy/v3/metrics/newrelic"
"github.com/imgproxy/imgproxy/v3/metrics/otel"
@@ -125,6 +126,10 @@ func Init() error {
GetAllocs,
)
cloudwatch.AddGaugeFunc("VipsMemory", "Bytes", GetMem)
cloudwatch.AddGaugeFunc("VipsMaxMemory", "Bytes", GetMemHighwater)
cloudwatch.AddGaugeFunc("VipsAllocs", "Count", GetAllocs)
return nil
}