Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.02 KB

File metadata and controls

42 lines (26 loc) · 1.02 KB

Basic Meter

These examples show how to use OpenTelemetry to capture and report metrics.

There are three different examples:

  • basic_metrics: Shows to how create a metric instrument, how to configure an exporter and a controller and also how to capture data by using the direct calling convention.
  • calling_conventions: Shows how to use the direct, bound and batch calling conventions.
  • observer: Shows how to use the observer instrument.

The source files of these examples are available :scm_web:`here <docs/examples/basic_meter/>`.

Installation

pip install opentelemetry-api
pip install opentelemetry-sdk
pip install psutil # needed to get ram and cpu usage in the observer example

Run the Example

python <example_name>.py

The output will be shown in the console after few seconds.

Useful links