docs/examples/opencensus-exporter-tracer/README.rst
This example shows how to use the OpenCensus Exporter to export traces to the OpenTelemetry collector.
The source files of this example are available :scm_web:here <docs/examples/opencensus-exporter-tracer/>.
.. code-block:: sh
pip install opentelemetry-api
pip install opentelemetry-sdk
pip install opentelemetry-exporter-opencensus
Before running the example, it's necessary to run the OpenTelemetry collector
and Jaeger. The :scm_web:docker <docs/examples/opencensus-exporter-tracer/docker/>
folder contains a docker-compose template with the configuration of those
services.
.. code-block:: sh
pip install docker-compose
cd docker
docker-compose up
Now, the example can be executed:
.. code-block:: sh
python collector.py
The traces are available in the Jaeger UI at http://localhost:16686/.
OpenTelemetry Collector_../../api/trace../../exporter/opencensus/opencensus.. _OpenTelemetry: https://github.com/open-telemetry/opentelemetry-python/ .. _OpenTelemetry Collector: https://github.com/open-telemetry/opentelemetry-collector