skillfed

oslo.metrics

Oslo Metrics library

oslo-metrics v0.16.0 345.1K downloads/30d#7,368 on PyPI
Permissive license Apache-2.0 Active released

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-metrics

uv

uv add oslo-metrics

poetry

poetry add oslo-metrics

Installing 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

Environment :: OpenStackIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonTyping :: Typed

Tags

oslo metrics collectionopenstack metrics libraryprometheus metrics oslomonitoring system integrationmetrics data exposureopenstack telemetryapplication metrics api
openstackobservabilityprometheus

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

oslo.log

oslo.log provides standardized logging…

permissive · top 5,000 on PyPI

oslo.messaging

Oslo Messaging provides a unified API for RPC…

permissive · top 15,000 on PyPI

oslo.vmware

oslo.vmware provides a library for common…

permissive · top 15,000 on PyPI

oslo.limit

oslo.limit enforces quota and rate limits…

permissive · top 15,000 on PyPI

starlette-prometheus

Adds Prometheus metrics collection and exposure…

copyleft · top 15,000 on PyPI

oslo.cache

oslo.cache wraps dogpile.cache to provide a…

permissive · top 15,000 on PyPI

oslo.middleware

oslo.middleware provides WSGI middleware…

permissive · top 15,000 on PyPI

oslo.policy

oslo.policy enforces role-based access control…

permissive · top 15,000 on PyPI

oslo.context

oslo.context provides utilities to store and…

permissive · top 5,000 on PyPI

prometheus-api-client

Connects to Prometheus monitoring systems and…

permissive · top 5,000 on PyPI