Skip to content

Add a versioned telemetry query contract - #78

Merged
mzupan merged 1 commit into
mainfrom
codex/unified-query-contract
Nov 7, 2026
Merged

mzupan merged 1 commit into
mainfrom
codex/unified-query-contract

Conversation

@mzupan

@mzupan mzupan commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add POST /api/v1/query/execute with a versioned request and response envelope for logs, spans, and PromQL queries.
  • Keep the existing query handlers and endpoints. Preserve tenant authorization, workload budgets, cursors, capped counts, and partial summaries.
  • Add operation-specific validation, safe error envelopes, a discoverable JSON Schema, and shared Rust/TypeScript adapter templates and fixtures.
  • Include contract files in the API image and check generated schema output in CI.

Validation

  • API library tests and main binary tests pass.
  • Clippy correctness and suspicious checks pass. Existing unrelated warnings remain.
  • python3 scripts/sync-query-contract.py --workspace .. --check passes across all clients.
  • Client validation includes frontend build, 571 unit tests, 158 browser tests, and Rust client suites.

Rollout

Merge and deploy this API change before deploying the updated clients. Legacy endpoints remain available. Updated clients use the new endpoint without automatic retries against legacy routes.

The licensed API needs its companion Dockerfile change to include the contract files.

Companion PRs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants