发布

  • [OPIK-5270] [BE][T SDK][P SDK] feat: add exclude support to search spans stream endpoint (#6133)

    frostbyte_neo 发布于 2026-04-08 16:07:23 +00:00

    • [OPIK-5270] [BE] feat: add exclude support to search spans stream endpoint

    Add exclude parameter to the span search stream endpoint
    (POST /spans/search), matching the trace search stream endpoint
    (PR #6098).

    • Add exclude field (Set<Span.SpanField>) to SpanSearchStreamRequest
    • Wire request.exclude() into SpanSearchCriteria in SpansResource
    • Call bindTemplateExcludeFieldVariables in SpanDAO.findSpanStream
      (reuses the CTE guards from the previous PR)
    • Update both OpenAPI specs with the exclude enum for span fields

    SDK changes (Python/TypeScript) require Fern regeneration and manual
    wiring of the exclude param through search_spans/searchSpans methods.

    • Fern generation

    • feat(sdk): wire exclude param through Python/TypeScript SDKs and add tests

    • fix(e2e): wait for spans to be ingested before asserting in span-search

    Spans are created as children of traces and may not be immediately
    available in ClickHouse when the search runs. Use waitForAtLeast
    to poll until all expected spans are indexed, matching the fixture's
    waitForTracesVisible pattern for traces.

    • Add wait_for_at_least/wait_for_timeout to spans.py route
    • Add waitForAtLeast/waitForTimeout to test-helper-client searchSpans
    • Use waitForAtLeast: totalSpans in both test steps
    • Addressed PR review comments

    • test(python): add unit tests for exclude param propagation in search_spans and search_traces

    Addresses review feedback from petrotiurin.

    下载附件