File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
grpc-python-opentelemetry Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ $ cp bazelisk-linux-amd64 /usr/local/bin/bazel
38
38
### ** What you’ll need**
39
39
40
40
* A computer with internet connection
41
+ * Ability to open three separate terminals.
41
42
42
43
<!-- TODO(yashkt/arvindbright) : Add some additional boilerplate stuff over here if needed. -->
43
44
@@ -95,7 +96,7 @@ int main(int argc, char** argv) {
95
96
```
96
97
97
98
> [!NOTE]
98
- > How a Prometheus Exporter is being set up on the OpenTelemetry Meter Provider.
99
+ > A Prometheus Exporter is being set up on the OpenTelemetry Meter Provider.
99
100
> (There are other ways to export the metrics as well. This codelab chooses the
100
101
> prometheus exporter.) This MeterProvider is provided to gRPC’s OpenTelemetry
101
102
> plugin as configuration. Once the OpenTelemetry plugin is registered globally
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ $ python -m pip install --upgrade pip
33
33
#### Install dependencies
34
34
35
35
``` console
36
- $ cd codelabs/gRPC_Python_OpenTelemetry_Plugin /
36
+ $ cd codelabs/grpc-python-opentelemetry /
37
37
$ python -m pip install -r requirements.txt
38
38
```
39
39
@@ -47,6 +47,7 @@ $ python -m pip install -r requirements.txt
47
47
### ** What you’ll need**
48
48
49
49
* A computer with internet connection
50
+ * Ability to open three separate terminals.
50
51
51
52
## Instrumenting applications with gRPC OpenTelemetry Plugin
52
53
@@ -67,6 +68,9 @@ import helloworld_pb2_grpc
67
68
from opentelemetry.exporter.prometheus import PrometheusMetricReader
68
69
from opentelemetry.sdk.metrics import MeterProvider
69
70
from prometheus_client import start_http_server
71
+
72
+ _SERVER_PORT = " 50051"
73
+ _PROMETHEUS_PORT = 9465
70
74
```
71
75
72
76
Then transform ` run() ` to look like
You can’t perform that action at this time.
0 commit comments