File: README.rst

package info (click to toggle)
python-opentelemetry 1.39.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,952 kB
  • sloc: python: 53,083; sh: 398; makefile: 142; sql: 39
file content (51 lines) | stat: -rw-r--r-- 1,254 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
OpenCensus Exporter
===================

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/>`.

Installation
------------

.. code-block:: sh

    pip install opentelemetry-api
    pip install opentelemetry-sdk
    pip install opentelemetry-exporter-opencensus

Run the Example
---------------

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/.

Useful links
------------

- OpenTelemetry_
- `OpenTelemetry Collector`_
- :doc:`../../api/trace`
- :doc:`../../exporter/opencensus/opencensus`

.. _OpenTelemetry: https://github.com/open-telemetry/opentelemetry-python/
.. _OpenTelemetry Collector: https://github.com/open-telemetry/opentelemetry-collector