You've already forked imgproxy
mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-11-29 23:07:40 +02:00
Move metrics.StartRequest to middleware && Fix Datadog
This commit is contained in:
@@ -26,6 +26,12 @@ func Stop() {
|
||||
datadog.Stop()
|
||||
}
|
||||
|
||||
func Enabled() bool {
|
||||
return prometheus.Enabled() ||
|
||||
newrelic.Enabled() ||
|
||||
datadog.Enabled()
|
||||
}
|
||||
|
||||
func StartRequest(ctx context.Context, rw http.ResponseWriter, r *http.Request) (context.Context, context.CancelFunc, http.ResponseWriter) {
|
||||
promCancel := prometheus.StartRequest()
|
||||
ctx, nrCancel, rw := newrelic.StartTransaction(ctx, rw, r)
|
||||
|
||||
Reference in New Issue
Block a user