What Vigilon tracks
See which Python libraries Vigilon tracks automatically, and how to leave out routes you do not want to monitor.
What Vigilon tracks automatically
Once Vigilon starts, it tracks every supported library that is installed in your app’s environment. There is nothing to turn on per library. Each request to your web app becomes a trace. Database queries and outgoing calls made during that request appear inside it as spans. A span records the timing and details of one operation.
Web frameworks: FastAPI, Flask, and Django. Django needs DJANGO_SETTINGS_MODULE set before Vigilon starts.
HTTP clients: requests, httpx, urllib3, and the aiohttp client.
PostgreSQL: psycopg and psycopg2.
MySQL: mysql-connector-python, PyMySQL, and mysqlclient. Async drivers such as aiomysql and asyncmy are tracked through SQLAlchemy’s async engine.
Other datastores: Redis, PyMongo, and SQLAlchemy, including async engines.
AWS: boto3 and botocore calls, plus Lambda invocations when running inside AWS Lambda.
Create database engines and HTTP clients after Vigilon starts, so it can track them.
When MySQL runs through SQLAlchemy, one query can show up as two spans, one inside the other: SQLAlchemy’s and the driver’s. They are two layers of the same query.
Background jobs are not tracked automatically. Installing Celery alone does not report jobs; wrap each job with with_job_monitor as described in the Background jobs guide.
Exclude health checks or other routes
Health checks and similar routes add noise. Vigilon leaves out /health$, /ready$, and /favicon\.ico$ by default. Excluded routes do not appear in Traces or Endpoints.
To leave out more routes, add comma-separated regular expressions with an environment variable:
export VIGILON_EXCLUDED_URLS='/internal/health$'
Or add excluded_urls to the register() call in telemetry.py. Your patterns are added to the defaults and to the environment variable; they do not replace them:
return vigilon.register(
api_key=api_key,
service_name=os.environ["VIGILON_SERVICE_NAME"],
environment=os.environ["VIGILON_ENVIRONMENT"],
service_version=os.environ.get("VIGILON_SERVICE_VERSION"),
excluded_urls=[r"/internal/health$"],
)
$ matches the end of the path, so /health$ does not match /health/. Flask also includes the query string when matching. For a Flask app, use /health(?:\?.*)?$ if you also want to leave out /health?probe=1.