Skip to content

Parent AI SDK OpenTelemetry spans from incoming HTTP trace context #33124

Closed as duplicate

Description

@iw-an

OpenTelemetry AI SDK spans currently export as independent traces when opencode is embedded behind an HTTP server that receives trace context. This makes spans such as ai.streamText, ai.streamText.doStream, and ai.toolCall difficult to correlate with the caller trace.

Expected behavior:

  • inbound W3C trace context should parent Effect request spans
  • AI SDK spans should inherit the same active OpenTelemetry context
  • users should be able to export only traces with OTEL_LOGS_EXPORTER=none

This issue tracks adding trace-context propagation for AI SDK telemetry while preserving existing OTLP configuration behavior.

Activity

  1. github-actions commented on Jun 20, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • No issue template was used. This looks like a feature request, but it is missing the required [FEATURE]: title prefix and the verification checkbox confirming the feature hasn't been suggested before. Please use the Feature Request template.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. iw-an commented on Jun 20, 2026

    @iw-an
    Author

    Closing this as a duplicate of #18801. I updated the PR to link the existing issue instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs:complianceThis means the issue will auto-close after 2 hours.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions