Agent prompt
Paste this into your coding agent
Replace YOUR_API_KEY after signup, then ask the agent to run the product flow and verify the first events.
Database Reliability Monitoring with SQL setup prompt
Instrument database reliability with Telemetry.
Use /skill.md and this Telemetry API key: YOUR_API_KEY
Add structured events around the application's database boundary for:
1. Completed queries with query_fingerprint, service, database_name, status, duration_ms, rows_returned, release, and environment.
2. Connection-pool samples with active_connections, idle_connections, max_connections, waiting callers, acquisition wait, and timeout outcome.
3. Terminal transactions with transaction_id, status, controlled error_type, duration_ms, and workflow context.
4. Lock waits, replication or CDC lag, and migration outcomes where the application already has an approved signal.
Create a dashboard for slow-query rate, pool wait rate, transaction rollback rate, lock waits, replication lag, and migration failures. Add alerts only after minimum volume and sustained-duration thresholds are reviewed.
Do not log raw SQL parameters, unrestricted statement text, connection strings, credentials, database error dumps, or customer records.Setup steps
- 1Choose one database-dependent workflow and define its safe operation fingerprints.
- 2Instrument the application database wrapper, pool, transaction boundary, and migration job.
- 3Send synthetic success, timeout, rollback, lock-wait, and lag examples.
- 4Review rates and thresholds with the database owner before enabling alerts.
Events to capture
Questions unlocked
- Which normalized database operations are slow most often?
- Which pools make callers wait or time out?
- Did a release change rollback, lock, migration, or replication behavior?
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 recipeNext step
Create the API key your agent will use
The free plan is enough to run the prompt, send test events, and review the first dashboard.
Related pages
Claude Code Observability
Give Claude Code a prompt that makes telemetry part of the implementation pass instead of a separate cleanup project.
Open pageCursor Telemetry Setup
A copyable setup prompt for adding event tables, funnel tracking, and dashboards from inside Cursor.
Open pageCodex Instrumentation Prompt
A focused prompt that asks Codex to instrument the rest of the product, verify events, and summarize coverage gaps.
Open page