Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

OpenTelemetry Metrics SDK

Warning

OpenTelemetry Python metrics are in an experimental state. The APIs within :mod:`opentelemetry.sdk._metrics` are subject to change in minor/patch releases and there are no backward compatability guarantees at this time.

Start the Collector locally to see data being exported. Write the following file:

# otel-collector-config.yaml
receivers:
    otlp:
        protocols:
            grpc:

exporters:
    logging:

processors:
    batch:

service:
    pipelines:
        metrics:
            receivers: [otlp]
            exporters: [logging]

Then start the Docker container:

docker run \
    -p 4317:4317 \
    -v $(pwd)/otel-collector-config.yaml:/etc/otel/config.yaml \
    otel/opentelemetry-collector-contrib:latest
$ python example.py

The resulting metrics will appear in the output from the collector and look similar to this:

TODO