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
|
Basic Trace
===========
These examples show how to use OpenTelemetry to create and export Spans. There are two different examples:
* basic_trace: Shows how to configure a SpanProcessor and Exporter, and how to create a tracer and span.
* resources: Shows how to add resource information to a Provider.
The source files of these examples are available :scm_web:`here <docs/examples/basic_tracer/>`.
Installation
------------
.. code-block:: sh
pip install opentelemetry-api
pip install opentelemetry-sdk
Run the Example
---------------
.. code-block:: sh
python <example_name>.py
The output will be shown in the console.
Useful links
------------
- OpenTelemetry_
- :doc:`../../api/trace`
.. _OpenTelemetry: https://github.com/open-telemetry/opentelemetry-python/
|