Conversation
Contributor
|
🌿 Preview your docs: https://opik-preview-c0019c72-93e7-47e3-bee8-b6990280d9f5.docs.buildwithfern.com/docs/opik The following broken links were found: Page: https://opik-preview-c0019c72-93e7-47e3-bee8-b6990280d9f5.docs.buildwithfern.com/docs/opik/integrations/harbor Page: https://opik-preview-c0019c72-93e7-47e3-bee8-b6990280d9f5.docs.buildwithfern.com/docs/opik/integrations/harbor/ 📌 Results for commit 0c54af2 |
apps/opik-backend/src/main/java/com/comet/opik/api/resources/v1/priv/TracesResource.java
Show resolved
Hide resolved
petrotiurin
reviewed
Apr 7, 2026
Contributor
petrotiurin
left a comment
There was a problem hiding this comment.
SDK side looks good, but let's add tests
2 tasks
andrescrz
added a commit
that referenced
this pull request
Apr 7, 2026
andrescrz
added a commit
that referenced
this pull request
Apr 8, 2026
…point 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. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merged
2 tasks
andrescrz
added a commit
that referenced
this pull request
Apr 8, 2026
…point 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. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
andrescrz
added a commit
that referenced
this pull request
Apr 8, 2026
…point 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.
andrescrz
added a commit
that referenced
this pull request
Apr 8, 2026
…ans stream endpoint (#6133) * [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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Add
excludeparameter to the search traces stream endpoint (POST /traces/search) and wire it through both Python and TypeScript SDKs. Whenexclude=["feedback_scores"]is passed, the feedback score CTE chain (~12.7 GiB pipeline overhead) is skipped entirely.This unblocks SDK users hitting OOM on
search_traces— the query was silently failing and returning 0 results because the feedback score pipeline exceeded the ClickHouse memory limit.excludefield toTraceSearchStreamRequest, wire intoTraceSearchCriteria, callbindTemplateExcludeFieldVariablesinfindTraceStreamexcludeparam toOpik.search_traces()→search_traces_with_filters()→ Fern clientexcludeparam toOpikClient.searchTraces()→searchTracesWithFilters()→ Fern clientChange checklist
Issues
AI-WATERMARK
AI-WATERMARK: yes
search_tracesOOM was caused by feedback score pipeline (61 GiB allocation attempt). Verified theexcludeparameter skips the CTEs.Testing
mvn compilepasses (BE)npx tsc --noEmitpasses (TS SDK)npx vitest run tests/unit/client/client-searchTraces.test.ts— 15/15 tests pass (updated assertion for 6thexcludearg)getStreamAndAssertContent) pass unchanged —excludedefaults to null (no-op)bindTemplateExcludeFieldVariablescode pathDocumentation
N/A — the
excludeparameter is documented in the SDK method docstrings and Fern-generated API docs.🤖 Generated with Claude Code