@@ -6,23 +6,16 @@ For this sample, the optional `open_telemetry` dependency group must be included
66
77 poetry install --with open_telemetry
88
9- To run, first see [ README.md] ( ../README.md ) for prerequisites. Then run the following to start a Jaeger container to
10- view the trace results:
9+ To run, first see [ README.md] ( ../README.md ) for prerequisites. Then run the following to start a Jaeger container
10+ with OTLP collector enabled to collect and view the trace results:
1111
1212 docker run -d --name jaeger \
13+ -e COLLECTOR_OTLP_ENABLED=true \
1314 -p 16686:16686 \
14- -p 6831:6831/udp \
15+ -p 4317:4317 \
16+ -p 4318:4318 \
1517 jaegertracing/all-in-one:latest
1618
17- Since that is running in the background (` -d ` ), you can also run the metrics collector in the foreground:
18-
19- docker run -p 4317:4317 \
20- -v /path/to/samples-python/open_telemetry/otel-metrics-collector-config.yaml:/etc/otel-collector-config.yaml \
21- otel/opentelemetry-collector:latest \
22- --config=/etc/otel-collector-config.yaml
23-
24- Replace ` /path/to/samples-python ` with the absolute path to the cloned samples repo.
25-
2619Now, from this directory, start the worker in its own terminal:
2720
2821 poetry run python worker.py
@@ -43,18 +36,3 @@ Therefore we intentionally start-then-end in-workflow spans immediately. So whil
4336accurate, the duration is not.
4437
4538The metrics should have been dumped out in the terminal where the OpenTelemetry collector container is running.
46-
47- ## OTLP gRPC
48-
49- Currently for tracing this example uses the ` opentelemetry-exporter-jaeger-thrift ` exporter because the common OTLP gRPC
50- exporter ` opentelemetry-exporter-otlp-proto-grpc ` uses an older, incompatible ` protobuf ` library. See
51- [ this issue] ( https://github.com/open-telemetry/opentelemetry-python/issues/2880 ) for more information.
52-
53- Once OTel supports latest protobuf, the exporter can be changed and Jaeger could be run with:
54-
55- docker run -d --name jaeger \
56- -e COLLECTOR_OTLP_ENABLED=true \
57- -p 16686:16686 \
58- -p 4317:4317 \
59- -p 4318:4318 \
60- jaegertracing/all-in-one:latest
0 commit comments