mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-30 10:56:28 +02:00
- 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>
17 lines
597 B
Go
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))
|
|
}
|