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 (
4343)
4444
4545var (
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" )
4747 prometheusEndpoint = flag .String ("prometheus_endpoint" , ":9465" , "the Prometheus exporter endpoint for metrics" )
4848)
4949
@@ -70,8 +70,8 @@ func main() {
7070 // up-to-date list of metrics, see:
7171 // https://grpc.io/docs/guides/opentelemetry-metrics/#instruments
7272 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 " ,
7575 ),
7676 },
7777 TraceOptions : oteltracing.TraceOptions {TracerProvider : traceProvider , TextMapPropagator : textMapPropagator },
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import (
4242)
4343
4444var (
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" )
4646 prometheusEndpoint = flag .String ("prometheus_endpoint" , ":9464" , "the Prometheus exporter endpoint for metrics" )
4747)
4848
@@ -78,8 +78,8 @@ func main() {
7878 // up-to-date list of metrics, see:
7979 // https://grpc.io/docs/guides/opentelemetry-metrics/#instruments
8080 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 " ,
8383 ),
8484 },
8585 TraceOptions : oteltracing.TraceOptions {TracerProvider : traceProvider , TextMapPropagator : textMapPropagator }})
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ func ExampleOptions_addExperimentalMetrics() {
137137 // up-to-date list of metrics, see:
138138 // https://grpc.io/docs/guides/opentelemetry-metrics/#instruments
139139 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 " ,
142142 ),
143143 },
144144 }
You can’t perform that action at this time.
0 commit comments