Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/courtsite/graphene-prometheus

📊 Prometheus exporter middleware for the Graphene GraphQL framework.
https://github.com/courtsite/graphene-prometheus

fastapi graphene graphene-graphql-framework graphene-prometheus middleware prometheus starlette

Last synced: about 1 month ago
JSON representation

📊 Prometheus exporter middleware for the Graphene GraphQL framework.

Awesome Lists containing this project

README

        

# graphene-prometheus

📊 Prometheus exporter middleware for the Graphene GraphQL framework.

_This is still under development. Use at your own risk._

## Usage

Install using `pip install graphene-prometheus` or `poetry add graphene-prometheus`.

### Graphene

```python
import graphene_prometheus

schema.execute("THE QUERY", middleware=[graphene_prometheus.PrometheusMiddleware()])
```

See https://docs.graphene-python.org/en/latest/execution/middleware/#middleware for more information.

### Django

In `settings.py`:

```python
GRAPHENE = {
"MIDDLEWARE": ["graphene_prometheus.PrometheusMiddleware"],
}
```

See https://docs.graphene-python.org/projects/django/en/latest/settings/#middleware for more information.

### FastAPI / Starlette

Coming soon.