Skip to content

feat: add error status fields to tracing-adaptor spec and update tracing-opensearch module version#548

Merged
akila-i merged 2 commits intoopenchoreo:mainfrom
akila-i:obs-traces-status
Apr 10, 2026
Merged

feat: add error status fields to tracing-adaptor spec and update tracing-opensearch module version#548
akila-i merged 2 commits intoopenchoreo:mainfrom
akila-i:obs-traces-status

Conversation

@akila-i
Copy link
Copy Markdown
Contributor

@akila-i akila-i commented Apr 9, 2026

Purpose

This pull request updates the observability-tracing-adapter-api.yaml specification 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:

  • Added a hasErrors boolean field to the trace object to indicate if any span in the trace has an error status.
  • Added a status string 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

  • Updated sidebars.ts if adding a new documentation page
  • Run npm run start to preview the changes locally
  • Run npm run build to ensure the build passes without errors
  • Verified all links are working (no broken links)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

📝 Walkthrough

Walkthrough

Added new fields to the observability tracing OpenAPI schema: TracesListResponse.traces[].hasErrors (boolean), and TraceSpansListResponse.spans[] plus TraceSpanDetailsResponse each gain a status string enum ("ok", "error", "unset").

Changes

Cohort / File(s) Summary
OpenAPI Schema Updates
static/api-specs/observability-tracing-adapter-api.yaml
Added hasErrors: boolean to trace list items; added status: string (enum: ["ok","error","unset"]) to span list items and span detail responses. No request shapes, endpoints, or control flow changed.
Docs / Helm chart version bumps
docs/getting-started/try-it-out/on-k3d-locally.mdx, docs/getting-started/try-it-out/on-k3d-locally/k3d-observability-plane.sh, docs/getting-started/try-it-out/on-your-environment.mdx
Bumped OpenSearch-based traces module chart version from 0.3.100.3.11 in install/upgrade snippets. No other doc or configuration changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description covers the purpose, related issues, and includes the required checklist, though items are not marked complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately and specifically describes the main changes: adding error status fields to the tracing-adapter spec and updating the tracing-opensearch module version.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
static/api-specs/observability-tracing-adapter-api.yaml (1)

317-319: Consider making hasErrors required in trace items.

At Line 317, if hasErrors is intended to always be present, leaving it optional introduces ambiguity for clients (false vs 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

📥 Commits

Reviewing files that changed from the base of the PR and between 11bd0a4 and d121d48.

📒 Files selected for processing (1)
  • static/api-specs/observability-tracing-adapter-api.yaml

@akila-i akila-i force-pushed the obs-traces-status branch from d121d48 to 0dfdfb1 Compare April 9, 2026 14:18
akila-i added 2 commits April 9, 2026 22:40
Signed-off-by: Akila-I <akila.99g@gmail.com>
Signed-off-by: Akila-I <akila.99g@gmail.com>
@akila-i akila-i force-pushed the obs-traces-status branch from 0dfdfb1 to 63cff77 Compare April 9, 2026 17:10
@akila-i akila-i changed the title feat: add error status fields to tracing-adaptor spec feat: add error status fields to tracing-adaptor spec and update tracing-opensearch module version Apr 9, 2026
@akila-i akila-i merged commit 380523f into openchoreo:main Apr 10, 2026
3 checks passed
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.

3 participants