Template
Paste this into your coding agent
Replace YOUR_API_KEY, run the flow locally, then verify the generated events and dashboards.
Database Reliability Monitoring Template
Instrument application-level database reliability with Telemetry.
Use /skill.md and this Telemetry API key: YOUR_API_KEY
Log database_query_completed, database_pool_sampled, database_transaction_completed, database_lock_wait_completed, database_replication_sampled, and database_migration_completed with controlled fields such as:
query_fingerprint, service, database_name, pool_name, status, duration_ms, acquisition_wait_ms, active_connections, idle_connections, max_connections, transaction_id, error_type, lag_seconds, migration_id, release, and environment.
Create dashboards and reviewed alerts for slow-query rate by fingerprint, connection-pool waits and timeouts, transaction rollback rate, unresolved locks and deadlocks, replica or CDC lag, and migration failures by release.
Use bounded operation names and allowlisted error categories. Do not log raw SQL, query parameters, connection strings, credentials, database error messages, or customer records.Events to capture
Verification checklist
What a complete instrumentation pass leaves behind
Events
Synthetic events reach the intended table with stable names and field types.
Queries
The first SQL queries return plausible rows with an explicit time window.
Views
A dashboard uses the real fields and includes enough context to explain a change.
Safety
Prompts, bodies, credentials, signatures, and private content were checked for redaction.
Related SQL recipes
Answer the next question with SQL
Run the query against the structured fields from this workflow, inspect the example result, and turn a useful answer into a dashboard or alert.
Detect N+1 Database Query Patterns
Which route and query combinations repeat suspiciously within a request?
Open recipeFind Slow Database Queries by Fingerprint
Which database operations are consistently slow enough to investigate?
Open recipeMeasure Database Connection-Pool Saturation
Which application pools are making callers wait for a database connection?
Open recipeCalculate Database Transaction Rollback Rate
Which services roll back an unusual share of database transactions?
Open recipeFind Database Lock Waits and Deadlocks
Which database operations create the most serious lock contention?
Open recipeMeasure Database Replication and CDC Lag
Which replicas or CDC consumers are falling behind their source database?
Open recipeTrack Database Migration Failures by Release
Which releases contain failed or rolled-back database migrations?
Open recipeMore templates
AI Agent Observability Template
Track agent runs, tool calls, retries, model latency, errors, and accepted outcomes with structured SQL-ready events.
Open templateBackground Job Failure Monitor
Capture queue, cron, import, billing sync, and webhook job health from the first run through retries and failures.
Open templateAPI Error And Latency Monitor
Watch request volume, status codes, route latency, failed endpoints, and customer-impacting API incidents.
Open template