1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

Generating histogram boundaries from weaver.yaml (#8015)

Adding support for histogram boundaries to be generated from weaver 

fixes #8002

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
This commit is contained in:
Saharsh Tibrewala
2026-05-21 00:12:55 +05:30
committed by GitHub
parent 97447f5c54
commit f12c29f68a
5 changed files with 14 additions and 0 deletions
+2
View File
@@ -739,6 +739,7 @@ type ClientRequestDuration struct {
var newClientRequestDurationOpts = []metric.Float64HistogramOption{
metric.WithDescription("Duration of HTTP client requests."),
metric.WithUnit("s"),
metric.WithExplicitBucketBoundaries([]float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}...),
}
// NewClientRequestDuration returns a new ClientRequestDuration instrument.
@@ -1450,6 +1451,7 @@ type ServerRequestDuration struct {
var newServerRequestDurationOpts = []metric.Float64HistogramOption{
metric.WithDescription("Duration of HTTP server requests."),
metric.WithUnit("s"),
metric.WithExplicitBucketBoundaries([]float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}...),
}
// NewServerRequestDuration returns a new ServerRequestDuration instrument.
+2
View File
@@ -65,6 +65,7 @@ type ClientCallDuration struct {
var newClientCallDurationOpts = []metric.Float64HistogramOption{
metric.WithDescription("Measures the duration of an outgoing Remote Procedure Call (RPC)."),
metric.WithUnit("s"),
metric.WithExplicitBucketBoundaries([]float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}...),
}
// NewClientCallDuration returns a new ClientCallDuration instrument.
@@ -223,6 +224,7 @@ type ServerCallDuration struct {
var newServerCallDurationOpts = []metric.Float64HistogramOption{
metric.WithDescription("Measures the duration of an incoming Remote Procedure Call (RPC)."),
metric.WithUnit("s"),
metric.WithExplicitBucketBoundaries([]float64{0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10}...),
}
// NewServerCallDuration returns a new ServerCallDuration instrument.