发布

  • [OPIK-3912] [SDK] Add thread ID support to Vercel AI SDK integration (#4792)

    frostbyte_neo 发布于 2026-01-19 09:05:01 +00:00

    • [OPIK-3912] [SDK] Add thread ID support to Vercel AI SDK integration

    Add threadId parameter to OpikExporterOptions to enable tracking multi-turn conversations and grouping related AI interactions.

    • Add threadId parameter to OpikExporterOptions interface
    • Implement getThreadId() method to extract thread ID from OpenTelemetry span attributes with fallback to constructor value
    • Update trace creation to include thread ID
    • Ensure per-request metadata threadId overrides exporter-level threadId
    • Add comprehensive test cases covering constructor-level, metadata-level, and precedence scenarios
    • Update documentation with examples and dedicated Thread ID Support section

    Implements OPIK-3912: Add thread ID support to Vercel AI SDK integration (TypeScript)

    • better attribute check

    Co-authored-by: baz-reviewer[bot] <174234987+baz-reviewer[bot]@users.noreply.github.com>


    Co-authored-by: baz-reviewer[bot] <174234987+baz-reviewer[bot]@users.noreply.github.com>

    下载附件