Skip to content

📊 Prometheus exporter middleware for the Graphene GraphQL framework.

License

Notifications You must be signed in to change notification settings

Courtsite/graphene-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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:

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

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

FastAPI / Starlette

Coming soon.