Skip to content

opsani/servo-metrics

Repository files navigation

servo-metrics

Run Tests license PyPI release GitHub release date

An Opsani Servo connector that tracks metrics about the servo and exposes them in Prometheus scrapeable format.

This connector is built on top of aioprometheus.

The connector is currently of beta quality.

Out of the box, the connector tracks basic servo metrics such as a counter of measurement and adjustment operations.

Configuration

By default, the connector is configured at the metrics key.

  • address: The address to bind to (default: "127.0.0.1").
  • port: The port to expose the metrics on (default: 9981).

Registering Metrics

TODO: Define a set of events that enable metrics to be defined by arbitrary connectors. See https://aioprometheus.readthedocs.io/en/latest/user/index.html

What we want to do here is provide an abstract interface that enables connectors to declare metrics and utilize a fire & forget mechanism to track them.

This probably means modeling generic type for Counter, Guage, and Histogram in the servo.types module.

Such an interface will allow us to plug in additional backends and avoid tight coupling in the servox core.

Multiservo Handling

TODO: Metrics are really an Assembly rather than a Servo level concern but we don't have support for that just yet.

Testing

Automated tests are implemented via Pytest: pytest .

License

servo-webhooks is distributed under the terms of the Apache 2.0 Open Source license.

A copy of the license is provided in the LICENSE file at the root of the repository.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages