Problem
Teams using OpenTelemetry want StagingTable operations to show up as spans with the right parent/child structure, not just as AS::Notifications events. Today users have to bridge manually.
Proposal
StagingTable::Instrumentation::OpenTelemetry — an opt-in adapter that emits OTel spans for stage, create_table, insert, transfer, drop_table, with attributes for source/staging table names, strategy, row counts, and durations.
require "staging_table/instrumentation/open_telemetry"
StagingTable::Instrumentation::OpenTelemetry.enable!
- Parent span is
stage, children are the lifecycle events
- Records errors on the span
- No OTel dep unless explicitly required
Acceptance criteria
- OTel adapter installed as an optional require
- Spans have semantic conventions where applicable (
db.system, db.name, db.operation)
- No hard dependency in the gemspec
- Tested against a local OTel collector
Problem
Teams using OpenTelemetry want StagingTable operations to show up as spans with the right parent/child structure, not just as AS::Notifications events. Today users have to bridge manually.
Proposal
StagingTable::Instrumentation::OpenTelemetry— an opt-in adapter that emits OTel spans forstage,create_table,insert,transfer,drop_table, with attributes for source/staging table names, strategy, row counts, and durations.stage, children are the lifecycle eventsAcceptance criteria
db.system,db.name,db.operation)