Skip to content
Database reliability

database_operation_completed event schema

A completed database operation represented by a reviewed fingerprint and coarse operation metadata. SQL text, bound values, credentials, and customer records are excluded.

Reviewed by the Telemetry product team on . We checked what each event represents, which service sends it, field types, sensitive data, the example, and validation steps. Who reviews this page

Question this event answers

Which operation fingerprints, releases, and database roles are slow or failing?

Fields
9
Required
9
Send and check an event

Record and query database_operation_completed

Document what each database_operation_completed row represents and which service sends it. Send test events to check the fields, then verify that the query answers your question.

  1. 1

    Outcome becomes final

    Database adapter or repository boundary emits only after the operation succeeds, rolls back, times out, or returns a classified error.

  2. 2

    Choose the fields

    9 required fields preserve the declared grain: One completed application-owned database operation.

  3. 3

    Check the test event

    Check types, UTC time, alternate outcomes, idempotency, and every pseudonymous or review-classified field.

  4. 4

    Query the result

    Which operation fingerprints, releases, and database roles are slow or failing?

Grain

One completed application-owned database operation.

Owner

Database adapter or repository boundary

Emit when

After the operation succeeds, rolls back, times out, or returns a classified error.

Field contract

Field types and data to exclude

Keep field names and types stable once production queries depend on them. Document optional fields and add them only when they answer a specific question.

FieldTypeRequiredPrivacyMeaning
timestamp_utctimestampyesnon-sensitiveUTC time when the operation finishes.
event_idstringyesnon-sensitiveStable unique identifier used for deduplication.
releasestringyesnon-sensitiveApplication or service version that emitted the event.
account_idstringyespseudonymousStable internal account identifier, never an email or name.
operation_namestringyesnon-sensitiveStable application operation such as create_dashboard.
query_fingerprintstringyesreviewReviewed normalized identifier; never raw SQL or bound values.
database_rolestringyesnon-sensitiveBounded role such as primary, replica, or analytics.
duration_msnumberyesnon-sensitiveApplication-observed duration in milliseconds.
statusstringyesnon-sensitiveSuccess, timeout, rollback, or classified error.

Synthetic JSON event

{
  "timestamp_utc": "2026-07-29T09:21:34Z",
  "event_id": "evt_database_01",
  "account_id": "acct_8f31",
  "release": "2026.07.3",
  "operation_name": "list_recent_events",
  "query_fingerprint": "select_recent_events_v2",
  "database_role": "analytics",
  "duration_ms": 241,
  "status": "success"
}

Privacy review

Review identifiers before ingestion

This example uses synthetic identifiers. Pseudonymous values can still be personal data, and review fields can expose business or provider context. Apply your own consent, retention, access, residency, and deletion requirements.

  • account_id: pseudonymous
  • query_fingerprint: review

Validation checklist

Test the schema before building a dashboard

  • Send one known database_operation_completed fixture after the documented outcome boundary.
  • Verify all 9 required fields arrive with the documented types.
  • Retry the same event identifier and confirm the chosen deduplication behavior.
  • Send a controlled failure or alternate outcome when the workflow supports one.
  • Run the related SQL over a fixed window and reconcile the result to the fixture.

Common mistakes

Record one result per row

  • Emitting database_operation_completed before database adapter or repository boundary knows the final outcome.
  • Mixing different kinds of results in one table, which makes counts and rates ambiguous.
  • Replacing controlled categories with raw URLs, payloads, prompts, or error text.
  • Changing a field type in place after saved queries and dashboards depend on it.
  • Adding identifiers without a documented investigation, access, and retention need.

Use the contract

Query the event and set up monitoring

Related contracts

Send a test event before production traffic

Create a free API key, send the synthetic event, and inspect the inferred table before connecting a live workflow.

Test this schema