Nautobot App GraphQL Observability
Project description
Nautobot App GraphQL Observability
A GraphQL observability app for Nautobot — Prometheus metrics and structured query logging.
Overview
A Nautobot app that provides comprehensive observability for the GraphQL API. It includes two Graphene middlewares that collect Prometheus metrics and emit structured query logs — without modifying Nautobot's core code.
Features
Prometheus Metrics (PrometheusMiddleware):
- Request metrics: Count and measure the duration of all GraphQL queries and mutations.
- Error tracking: Count errors by operation and exception type.
- Query depth & complexity: Histogram metrics for query nesting depth and total field count.
- Per-user tracking: Count requests per authenticated user for auditing and capacity planning.
- Per-field resolution: Optionally measure individual field resolver durations for debugging.
- All metrics appear at Nautobot's default
/metrics/endpoint — no extra endpoint needed.
Query Logging (GraphQLQueryLoggingMiddleware):
- Structured log entries: Operation type, name, user, duration, and status for every query.
- Optional query body and variables: Include the full query text and variables in log entries.
- Standard Python logging: Route logs to any backend (file, syslog, ELK, etc.) via Django's
LOGGINGconfiguration.
General:
- Zero configuration: Automatically patches Nautobot's
GraphQLDRFAPIViewto load the middlewares — no manualGRAPHENE["MIDDLEWARE"]setup needed.
Quick Install
pip install nautobot-graphql-observability
# nautobot_config.py
PLUGINS = ["nautobot_graphql_observability"]
Documentation
Full documentation is bundled with the app and available in the docs folder of this repository:
- User Guide (
docs/user/) - Overview, Using the App, Getting Started. - Administrator Guide (
docs/admin/) - How to Install, Configure, Upgrade, or Uninstall the App. - Developer Guide (
docs/dev/) - Extending the App, Code Reference, Contribution Guide. - Release Notes (
docs/admin/release_notes/). - FAQ (
docs/user/faq.md).
Contributing to the Documentation
You can find all the Markdown source for the App documentation under the docs folder in this repository. For simple edits, a Markdown capable editor is sufficient: clone the repository and edit away.
If you need to view the fully-generated documentation site, you can build it with MkDocs. A container hosting the documentation can be started using the invoke commands on http://localhost:8001. Using this container, as your changes to the documentation are saved, they will be automatically rebuilt and any pages currently being viewed will be reloaded in your browser.
Any PRs with fixes or improvements are very welcome!
Questions
For any questions or comments, please check the FAQ first. Feel free to open an issue on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nautobot_graphql_observability-2.1.0.tar.gz.
File metadata
- Download URL: nautobot_graphql_observability-2.1.0.tar.gz
- Upload date:
- Size: 957.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c581132e5c2700fb46e264bd01a03a3b784c84a15894291ba87539735261cbb9
|
|
| MD5 |
a44475e0770ca7f9babc63370481ec7f
|
|
| BLAKE2b-256 |
ced57e380e031de7524462c2ce315c778fc385d7eb775a49af703a11577afa7b
|
Provenance
The following attestation bundles were made for nautobot_graphql_observability-2.1.0.tar.gz:
Publisher:
release.yml on slydien/nautobot-app-graphql-observability
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nautobot_graphql_observability-2.1.0.tar.gz -
Subject digest:
c581132e5c2700fb46e264bd01a03a3b784c84a15894291ba87539735261cbb9 - Sigstore transparency entry: 969118590
- Sigstore integration time:
-
Permalink:
slydien/nautobot-app-graphql-observability@51a681ca519d7a14a062726e2736ac6867cabf59 -
Branch / Tag:
refs/tags/v2.1.0 - Owner: https://github.com/slydien
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@51a681ca519d7a14a062726e2736ac6867cabf59 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nautobot_graphql_observability-2.1.0-py3-none-any.whl.
File metadata
- Download URL: nautobot_graphql_observability-2.1.0-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4d675b8fb3ba2b8862a7a8cb89f98c0e51bf0cf40afa8bbeea3c6d5bba1bcb9
|
|
| MD5 |
03e71059ed63200f62ae65cfcbb38e70
|
|
| BLAKE2b-256 |
98c0efa53fb3f400a5b0a609d9e878004d93e2740bc6ea7a50d2a768def8e7c7
|
Provenance
The following attestation bundles were made for nautobot_graphql_observability-2.1.0-py3-none-any.whl:
Publisher:
release.yml on slydien/nautobot-app-graphql-observability
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nautobot_graphql_observability-2.1.0-py3-none-any.whl -
Subject digest:
a4d675b8fb3ba2b8862a7a8cb89f98c0e51bf0cf40afa8bbeea3c6d5bba1bcb9 - Sigstore transparency entry: 969118592
- Sigstore integration time:
-
Permalink:
slydien/nautobot-app-graphql-observability@51a681ca519d7a14a062726e2736ac6867cabf59 -
Branch / Tag:
refs/tags/v2.1.0 - Owner: https://github.com/slydien
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@51a681ca519d7a14a062726e2736ac6867cabf59 -
Trigger Event:
release
-
Statement type: