QueryShield production monitoring middleware for FastAPI and Django
Project description
queryshield-monitoring
Production database query monitoring middleware for QueryShield.
Monitor real-world database query performance in FastAPI and Django applications with minimal overhead.
Features
- Low-overhead query sampling (configurable rate)
- Batch upload to SaaS backend
- Performance regression detection
- Slow query alerting
- Integration with FastAPI middleware
- Integration with Django middleware
- Slack notifications
Installation
pip install queryshield-monitoring
Usage
FastAPI
from fastapi import FastAPI
from queryshield_monitoring import QueryShieldMiddleware
app = FastAPI()
app.add_middleware(
QueryShieldMiddleware,
api_key="sk_...",
sample_rate=0.01,
slow_query_threshold_ms=500
)
Django
# settings.py
MIDDLEWARE = [
'queryshield_monitoring.middleware.QueryShieldMiddleware',
]
QUERYSHIELD = {
'API_KEY': 'sk_...',
'SAMPLE_RATE': 0.01,
'SLOW_QUERY_THRESHOLD_MS': 500,
}
Documentation
See the main QueryShield documentation for more information.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 queryshield_monitoring-0.2.0-py3-none-any.whl.
File metadata
- Download URL: queryshield_monitoring-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f229fbd7744908cc8e00e64b5019256bd9d52228203a70c72bc4e196e8a966
|
|
| MD5 |
350be570b3cd0f7ceb2990d9b5f9c058
|
|
| BLAKE2b-256 |
104ac54a0f47e5c8cdb9f6a3d8dfe8c9b5a649f8133ea0b2f2dc043d2a2d9def
|