feat: add error status fields to tracing-adaptor spec and update tracing-opensearch module version#548
Conversation
📝 WalkthroughWalkthroughAdded new fields to the observability tracing OpenAPI schema: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
static/api-specs/observability-tracing-adapter-api.yaml (1)
317-319: Consider makinghasErrorsrequired in trace items.At Line 317, if
hasErrorsis intended to always be present, leaving it optional introduces ambiguity for clients (falsevs missing). Marking it required tightens the response contract.Optional contract hardening
items: type: object properties: traceId: type: string @@ hasErrors: type: boolean description: Whether any span in the trace has an error status. + required: + - traceId + - hasErrors🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@static/api-specs/observability-tracing-adapter-api.yaml` around lines 317 - 319, The trace item schema currently defines "hasErrors" as an optional boolean; to harden the contract, update the trace item schema to make hasErrors required by adding "hasErrors" to the schema's required array so clients always receive an explicit true/false value; locate the trace item object that declares the "hasErrors" property and add "hasErrors" to its required list (ensure any example/test fixtures are updated accordingly).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@static/api-specs/observability-tracing-adapter-api.yaml`:
- Around line 361-363: The schema currently declares status as an unconstrained
string while the description lists fixed values; update both
TraceSpansListResponse.spans[].status and TraceSpanDetailsResponse.status to
include an enum with the allowed values ["ok","error","unset"] and keep the
existing description; ensure the type remains string and add the enum array in
both locations so validators and generated clients enforce the permitted
statuses.
---
Nitpick comments:
In `@static/api-specs/observability-tracing-adapter-api.yaml`:
- Around line 317-319: The trace item schema currently defines "hasErrors" as an
optional boolean; to harden the contract, update the trace item schema to make
hasErrors required by adding "hasErrors" to the schema's required array so
clients always receive an explicit true/false value; locate the trace item
object that declares the "hasErrors" property and add "hasErrors" to its
required list (ensure any example/test fixtures are updated accordingly).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 255b26f5-37fb-4f85-9762-c9c3a5f62b9a
📒 Files selected for processing (1)
static/api-specs/observability-tracing-adapter-api.yaml
d121d48 to
0dfdfb1
Compare
Signed-off-by: Akila-I <akila.99g@gmail.com>
Signed-off-by: Akila-I <akila.99g@gmail.com>
0dfdfb1 to
63cff77
Compare
Purpose
This pull request updates the
observability-tracing-adapter-api.yamlspecification to enhance trace and span metadata. The changes add new fields to better indicate error states and execution status for traces and spans.Based on new fields added via openchoreo/openchoreo#3185
Trace and Span Metadata Enhancements:
hasErrorsboolean field to the trace object to indicate if any span in the trace has an error status.statusstring field to both span summary and span detail objects, describing the execution status as "ok", "error", or "unset". [1] [2]Related Issues
openchoreo/openchoreo#3067
Checklist
sidebars.tsif adding a new documentation pagenpm run startto preview the changes locallynpm run buildto ensure the build passes without errors