mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
committed by
GitHub
parent
298ac20dc5
commit
747513d444
@@ -10,7 +10,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/metrics"
|
||||
"github.com/grafana/grafana/pkg/infra/metrics/metricutil"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
@@ -73,7 +73,7 @@ type dataSourceTransport struct {
|
||||
|
||||
func instrumentRoundtrip(datasourceName string, next http.RoundTripper) promhttp.RoundTripperFunc {
|
||||
return promhttp.RoundTripperFunc(func(r *http.Request) (*http.Response, error) {
|
||||
datasourceLabelName, err := metrics.SanitizeLabelName(datasourceName)
|
||||
datasourceLabelName, err := metricutil.SanitizeLabelName(datasourceName)
|
||||
// if the datasource named cannot be turned into a prometheus
|
||||
// label we will skip instrumenting these metrics.
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user