Skip to main content

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 LOGGING configuration.

General:

  • Zero configuration: Automatically patches Nautobot's GraphQLDRFAPIView to load the middlewares — no manual GRAPHENE["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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nautobot_graphql_observability-2.1.0.tar.gz (957.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file nautobot_graphql_observability-2.1.0.tar.gz.

File metadata

File hashes

Hashes for nautobot_graphql_observability-2.1.0.tar.gz
Algorithm Hash digest
SHA256 c581132e5c2700fb46e264bd01a03a3b784c84a15894291ba87539735261cbb9
MD5 a44475e0770ca7f9babc63370481ec7f
BLAKE2b-256 ced57e380e031de7524462c2ce315c778fc385d7eb775a49af703a11577afa7b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nautobot_graphql_observability-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nautobot_graphql_observability-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4d675b8fb3ba2b8862a7a8cb89f98c0e51bf0cf40afa8bbeea3c6d5bba1bcb9
MD5 03e71059ed63200f62ae65cfcbb38e70
BLAKE2b-256 98c0efa53fb3f400a5b0a609d9e878004d93e2740bc6ea7a50d2a768def8e7c7

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page