Skip to content

feat: add db.tx span with op and table_count attributes - #1226

Merged
Baskarayelu merged 2 commits into
CredenceOrg:mainfrom
Theraxia:feat/db-tx-span
Jul 30, 2026
Merged

feat: add db.tx span with op and table_count attributes#1226
Baskarayelu merged 2 commits into
CredenceOrg:mainfrom
Theraxia:feat/db-tx-span

Conversation

@Theraxia

Copy link
Copy Markdown
Contributor

Introduce OpenTelemetry span 'db.tx' wrapping TransactionManager transactions, exposing 'op' (operation label) and 'table_count' (number of unique tables referenced) as span attributes.

  • Add DbSpans constant to src/tracing/tracer.ts
  • Add optional 'op' field to TransactionOptions
  • Track unique table names via SQL keyword regex in createBudgetedClient
  • Set table_count attribute on the span after the user fn completes
  • Document the new span in docs/observability.md

Closes #1000

Theraxia added 2 commits June 26, 2026 16:20
Introduce OpenTelemetry span 'db.tx' wrapping TransactionManager
transactions, exposing 'op' (operation label) and 'table_count'
(number of unique tables referenced) as span attributes.

- Add DbSpans constant to src/tracing/tracer.ts
- Add optional 'op' field to TransactionOptions
- Track unique table names via SQL keyword regex in createBudgetedClient
- Set table_count attribute on the span after the user fn completes
- Document the new span in docs/observability.md

Closes CredenceOrg#560
@Baskarayelu
Baskarayelu merged commit 3fefaf6 into CredenceOrg:main Jul 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] Caching: add read-through Redis cache + invalidation for trust score endpoint

2 participants