# oslo_metrics package

## Subpackages

- oslo_metrics.metrics package
  - Submodules
  - oslo_metrics.metrics.oslo_messaging module
  - Module contents

## Submodules

## oslo_metrics.message_router module

class oslo_metrics.message_router.MessageRouter

  Bases: `object`

  dispatch(metric: Metric) → None
  process(raw_string: bytes) → None

## oslo_metrics.message_type module

class oslo_metrics.message_type.Metric(module: str, name: str, action: MetricAction, **labels: str)

  Bases: `object`

  classmethod from_json(encoded: str) → Metric
  to_json() → str

class oslo_metrics.message_type.MetricAction(action: str, value: str)

  Bases: `object`

  actions = ['inc', 'observe']
  classmethod from_dict(metric_action_dict: _MetricActionDict) → MetricAction
  classmethod validate(metric_action_dict: _MetricActionDict) → None

exception oslo_metrics.message_type.MetricValidationError(message: str | None = None)

  Bases: `Exception`

exception oslo_metrics.message_type.UnSupportedMetricActionError(message: str | None = None)

  Bases: `Exception`

## Module contents

this page last updated: 2026-03-03 13:37:44

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug