mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Datasources: Enable native histograms for datasource response size metric (#87962)
This commit is contained in:
parent
c46c0c9eb9
commit
961272a76d
@ -7,6 +7,7 @@
|
||||
command: >
|
||||
--enable-feature=remote-write-receiver
|
||||
--enable-feature=exemplar-storage
|
||||
--enable-feature=native-histograms
|
||||
--config.file=/etc/prometheus/prometheus.yml
|
||||
--storage.tsdb.path=/prometheus
|
||||
volumes:
|
||||
|
@ -4,6 +4,7 @@ global:
|
||||
|
||||
scrape_configs:
|
||||
- job_name: grafana
|
||||
scrape_classic_histograms: true
|
||||
static_configs:
|
||||
- targets:
|
||||
- host.docker.internal:3000
|
||||
|
@ -3,6 +3,7 @@ package httpclientprovider
|
||||
import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
|
||||
"github.com/grafana/grafana/pkg/infra/httpclient"
|
||||
@ -33,10 +34,13 @@ var (
|
||||
|
||||
datasourceResponseHistogram = promauto.NewHistogramVec(
|
||||
prometheus.HistogramOpts{
|
||||
Namespace: "grafana",
|
||||
Name: "datasource_response_size_bytes",
|
||||
Help: "histogram of data source response sizes returned to Grafana",
|
||||
Buckets: []float64{128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576},
|
||||
Namespace: "grafana",
|
||||
Name: "datasource_response_size_bytes",
|
||||
Help: "histogram of data source response sizes returned to Grafana",
|
||||
Buckets: []float64{128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576},
|
||||
NativeHistogramBucketFactor: 1.1,
|
||||
NativeHistogramMaxBucketNumber: 100,
|
||||
NativeHistogramMinResetDuration: time.Hour,
|
||||
}, []string{"datasource", "datasource_type", "secure_socks_ds_proxy_enabled"},
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user