Skip to content

OpenTelemetry span adapter for tracing alongside AS::Notifications #36

@sncalvo

Description

@sncalvo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions