oslo.metrics
Oslo Metrics library
What it is and what it does
Oslo Metrics is a library that provides a standardized API for collecting metrics data from other Oslo libraries and exposing that data to monitoring systems. It is part of the OpenStack Oslo project and integrates with prometheus-client to bridge application-level metrics collection with external monitoring infrastructure.
The package is intended for use within OpenStack deployments and services that need to instrument their code and report metrics to centralized monitoring. It abstracts the metrics collection interface so that Oslo libraries can emit metrics without tight coupling to a specific monitoring backend.
Use it for:
- Instrument OpenStack services to collect performance and operational metrics for export to Prometheus or other monitoring systems.
- Aggregate metrics from multiple Oslo libraries into a single, unified metrics API for centralized observability.
- Enable real-time monitoring of OpenStack component health, resource usage, and request latencies.
- Build custom dashboards and alerts based on metrics collected from OpenStack infrastructure.
- Track application-level events and state changes in long-running OpenStack services.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Collects and exposes metrics data from Oslo libraries to monitoring systems via a standardized metrics API.
Yes, if you are building or deploying OpenStack services or integrating with the Oslo library ecosystem. The package is actively maintained, has no known vulnerabilities, and provides a clean abstraction for metrics collection. Not relevant for non-OpenStack projects.
Install
oslo-metrics on PyPI
pip
pip install oslo-metricsuv
uv add oslo-metricspoetry
poetry add oslo-metricsInstalling oslo.metrics
Before you install
Low install friction with a pure-wheel distribution. Active maintenance status and recent release (88 days ago) indicate ongoing support. Runtime dependency on prometheus-client and other Oslo libraries is standard for OpenStack ecosystem packages.
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions—include a copy of the license and note material changes.
Quickstart
pip install oslo-metrics
from oslo_metrics import api
metrics = api.get_metrics()
Requires Python 3.10 or later; designed for OpenStack environments.
Verify before relying
- Whether the package provides direct Prometheus exposition or requires additional setup to expose metrics to a monitoring backend.
- What specific metrics types (counters, gauges, histograms) the API supports.
- How metrics collection integrates with existing Oslo library instrumentation.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — pbr, oslo.utils, oslo.log, oslo.config, prometheus-client |
| Maintenance | actively maintained — 88 days since the last release |
| First released | |
| Downloads | 345,121/month — #7,368 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: oslo_metrics-0.16.0-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
oslo.logoslo.log provides standardized logging…
permissive · top 5,000 on PyPI
oslo.messagingOslo Messaging provides a unified API for RPC…
permissive · top 15,000 on PyPI
oslo.vmwareoslo.vmware provides a library for common…
permissive · top 15,000 on PyPI
oslo.limitoslo.limit enforces quota and rate limits…
permissive · top 15,000 on PyPI
starlette-prometheusAdds Prometheus metrics collection and exposure…
copyleft · top 15,000 on PyPI
oslo.cacheoslo.cache wraps dogpile.cache to provide a…
permissive · top 15,000 on PyPI
oslo.middlewareoslo.middleware provides WSGI middleware…
permissive · top 15,000 on PyPI
oslo.policyoslo.policy enforces role-based access control…
permissive · top 15,000 on PyPI
oslo.contextoslo.context provides utilities to store and…
permissive · top 5,000 on PyPI
prometheus-api-clientConnects to Prometheus monitoring systems and…
permissive · top 5,000 on PyPI