File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
examples/features/opentelemetry Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ import (
43
43
)
44
44
45
45
var (
46
- addr = flag .String ("addr" , ":50051" , "the server address to connect to" )
46
+ addr = flag .String ("addr" , "localhost :50051" , "the server address to connect to" )
47
47
prometheusEndpoint = flag .String ("prometheus_endpoint" , ":9465" , "the Prometheus exporter endpoint for metrics" )
48
48
)
49
49
@@ -70,8 +70,8 @@ func main() {
70
70
// up-to-date list of metrics, see:
71
71
// https://grpc.io/docs/guides/opentelemetry-metrics/#instruments
72
72
Metrics : opentelemetry .DefaultMetrics ().Add (
73
- "grpc.client.attempt.started " ,
74
- "grpc.client.attempt.duration " ,
73
+ "grpc.lb.pick_first.connection_attempts_succeeded " ,
74
+ "grpc.lb.pick_first.connection_attempts_failed " ,
75
75
),
76
76
},
77
77
TraceOptions : oteltracing.TraceOptions {TracerProvider : traceProvider , TextMapPropagator : textMapPropagator },
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import (
42
42
)
43
43
44
44
var (
45
- addr = flag .String ("addr" , ":50051" , "the server address to connect to" )
45
+ addr = flag .String ("addr" , "localhost :50051" , "the server address to connect to" )
46
46
prometheusEndpoint = flag .String ("prometheus_endpoint" , ":9464" , "the Prometheus exporter endpoint for metrics" )
47
47
)
48
48
@@ -78,8 +78,8 @@ func main() {
78
78
// up-to-date list of metrics, see:
79
79
// https://grpc.io/docs/guides/opentelemetry-metrics/#instruments
80
80
Metrics : opentelemetry .DefaultMetrics ().Add (
81
- "grpc.server.call.started " ,
82
- "grpc.server.call.duration " ,
81
+ "grpc.lb.pick_first.connection_attempts_succeeded " ,
82
+ "grpc.lb.pick_first.connection_attempts_failed " ,
83
83
),
84
84
},
85
85
TraceOptions : oteltracing.TraceOptions {TracerProvider : traceProvider , TextMapPropagator : textMapPropagator }})
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ func ExampleOptions_addExperimentalMetrics() {
137
137
// up-to-date list of metrics, see:
138
138
// https://grpc.io/docs/guides/opentelemetry-metrics/#instruments
139
139
Metrics : opentelemetry .DefaultMetrics ().Add (
140
- "grpc.client.attempt.started " ,
141
- "grpc.client.attempt.duration " ,
140
+ "grpc.lb.pick_first.connection_attempts_succeeded " ,
141
+ "grpc.lb.pick_first.connection_attempts_failed " ,
142
142
),
143
143
},
144
144
}
You can’t perform that action at this time.
0 commit comments