claws / aioprometheus

A Prometheus Python client library for asyncio-based applications
176 stars 21 forks source link

Simplify metrics creation #58

Closed claws closed 3 years ago

claws commented 3 years ago

This merge request simplifies the aioprometheus API to allow metrics to be automatically registered when they are created. This removes the need for a user to have to explicitly register each metric after creating them.

This merge request also changes which modules are imported by default. Instead of importing everything and having to accommodate for optional dependencies, this update requires a user to explicitly import any modules that depend on optional dependencies. This simplifies the package implementation.

Documentation is reworked to describe the simplified metrics creation process and generally simplify the documentation.

Examples and unittests are updated where necessary to capture the simplified process.