Emplocity / nameko-prometheus

Prometheus metrics collector and exporter for nameko microservice framework
https://pypi.org/project/nameko-prometheus/
Other
19 stars 5 forks source link

Full stack example using docker-compose #7

Closed zsiciarz closed 4 years ago

zsiciarz commented 4 years ago

We could provide a demo/example using a small nameko service that has all the supported entrypoints (RPC, events, HTTP). The service should run as a container.

The compose stack should include RabbitMQ and Prometheus images, without any persistent volumes for simplicity. Prometheus config must include scraping our service's /metrics endpoint (we can bind-mount the config).

Our service should start and call itself regularly/randomly without any input from the user. The goal is to call docker-compose up, navigate to Prometheus UI and observe that service metrics appear there.

zsiciarz commented 4 years ago

We can use once from https://github.com/nameko/nameko/blob/master/nameko/testing/services.py#L501 to call method on startup which then calls other service methods and emits events.