Skip to main content

OpenCensus Prometheus Exporter

pypi

Installation

pip install opencensus-ext-prometheus

Usage

The OpenCensus Prometheus Stats Exporter allows users to export metrics to Prometheus monitoring solution. The API of this project is still evolving. The use of vendoring or a dependency management tool is recommended.

Prometheus Exporter Usage

Prometheus Import

from opencensus.ext.prometheus import stats_exporter as prometheus
from opencensus.stats import stats as stats_module

Prometheus Prerequisites

  • OpenCensus Python libraries require Python 2.7 or later.

  • Prometheus up and running.

Register the Prometheus exporter

stats = stats_module.stats
view_manager = stats.view_manager

exporter = prometheus.new_stats_exporter(prometheus.Options(namespace="<namespace>"))
view_manager.register_exporter(exporter)
...

Prometheus Code Reference

In the examples folder, you can find all the necessary steps to get the exporter, register a view, put tags on the measure, and see the values against the Prometheus monitoring tool.

For further details for the Prometheus implementation, see the folder prometheus/stats_exporter.

Path & File

Short Description

contrib/opencensus-ext-prometheus/examples/

End to end example

contrib/opencensus-ext-prometheus/opencensus/ext/prometheus/stats_exporter/

Stats implementation for Prometheus

References

Metadata

Release files for opencensus-ext-prometheus 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for opencensus-ext-prometheus 0.2.1
File Interpreter ABI Platform Actions
opencensus_ext_prometheus-0.2.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for opencensus_ext_prometheus-0.2.1-py2.py3-none-any.whl

Release files / opencensus_ext_prometheus-0.2.1-py2.py3-none-any.whl

Download URL opencensus_ext_prometheus-0.2.1-py2.py3-none-any.whl
Size 6.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4521d6061ee2fe10e9bb186eedb26bf15f9270c6ae7e7673887c64d8c4c47255
BLAKE2b-256 checksum
How to use checksums
844a7e37d161786021e83fc9dc48d296344c3568b9e0655925c85a983d8666cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Security for opencensus-ext-prometheus 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page