Skip to content

[3845] feat(observability): support lexicographic string range filters#3846

Merged
jp-agenta merged 1 commit intorelease/v0.87.1from
feat/tracing-string-lexicographic-filters
Feb 26, 2026
Merged

[3845] feat(observability): support lexicographic string range filters#3846
jp-agenta merged 1 commit intorelease/v0.87.1from
feat/tracing-string-lexicographic-filters

Conversation

@mmabrouk
Copy link
Member

@mmabrouk mmabrouk commented Feb 26, 2026

Summary

  • Allow gt/gte/lt/lte for string fields in tracing query parsing and DAO routing, enabling lexicographic range filtering for string values (including datetime strings stored in attributes).
  • Expose these operators in the Observability filter UI for string/custom fields.
  • Add API E2E coverage for string comparison operators and update Query API docs with string range guidance and examples.

Linked issue

Validation

  • uvx --from ruff==0.14.0 ruff format oss/src/core/tracing/utils.py oss/src/dbs/postgres/tracing/utils.py oss/tests/pytest/e2e/tracing/test_spans_queries.py
  • uvx --from ruff==0.14.0 ruff check --fix oss/src/core/tracing/utils.py oss/src/dbs/postgres/tracing/utils.py oss/tests/pytest/e2e/tracing/test_spans_queries.py
  • corepack pnpm lint-fix (from web/)
  • AGENTA_API_URL=http://144.76.237.122:8280/api AGENTA_AUTH_KEY=replace-me uvx --from pytest --with requests --with python-dotenv pytest -c /dev/null oss/tests/pytest/e2e/tracing/test_spans_queries.py::TestSpanStringComparisonOperators -v (5 passed)

Manual test steps

  1. Open Observability and add a Custom filter using key tags.created_at.
  2. Verify operators >, >=, <, <= are available for string custom fields.
  3. Use range conditions:
    • tags.created_at >= 2024-01-15T00:00:00Z
    • tags.created_at < 2024-01-20T00:00:00Z
  4. Confirm results include only spans with string datetime values in that lexical range.
  5. Via API, POST to /api/tracing/spans/query with:
    • {"field":"attributes","key":"tags.created_at","operator":"gte","value":"2024-01-15T00:00:00Z"}
    • {"field":"attributes","key":"tags.created_at","operator":"lt","value":"2024-01-20T00:00:00Z"}
      and verify filtered results match UI output.

Open with Devin

@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Feb 26, 2026 6:10pm

Request Review

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Feb 26, 2026
@dosubot dosubot bot added the feature label Feb 26, 2026
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2026

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-02-26T19:18:20.327Z

@jp-agenta jp-agenta changed the base branch from main to release/v0.87.1 February 26, 2026 19:07
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 26, 2026
@jp-agenta jp-agenta merged commit 8566703 into release/v0.87.1 Feb 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support lexicographic range filtering for string fields in tracing queries

2 participants