pomerium/internal/telemetry/http.go
bobby f837c92741
dev: update linter (#1728)
- gofumpt everything
- fix TLS MinVersion to be at least 1.2
- add octal syntax
- remove newlines
- fix potential decompression bomb in ecjson
- remove implicit memory aliasing in for loops.

Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
2020-12-30 09:02:57 -08:00

17 lines
597 B
Go

package telemetry
import (
"net/http"
"github.com/pomerium/pomerium/internal/telemetry/metrics"
)
// HTTPStatsRoundTripper creates tracing and metrics RoundTripper for a pomerium service
func HTTPStatsRoundTripper(service string, destination string) func(next http.RoundTripper) http.RoundTripper {
return metrics.HTTPMetricsRoundTripper(ServiceName(service), destination)
}
// HTTPStatsHandler creates tracing and metrics Handler for a pomerium service
func HTTPStatsHandler(service string) func(next http.Handler) http.Handler {
return metrics.HTTPMetricsHandler(ServiceName(service))
}