Skip to content

fix: export the component state error and suggested actions to backend - #234

Merged
ambermingxin merged 1 commit into
mainfrom
fix/export-state-error
Jul 23, 2026
Merged

fix: export the component state error and suggested actions to backend#234
ambermingxin merged 1 commit into
mainfrom
fix/export-state-error

Conversation

@ambermingxin

@ambermingxin ambermingxin commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • Component health data now includes error details and suggested remediation actions.
    • Exported health logs include these details when available, helping provide clearer diagnostic context.
  • Bug Fixes

    • Preserved consistent empty or omitted values when components have no health-state details.
    • Improved handling of optional health information in exported telemetry.

Signed-off-by: Amber Xue <ambermingxin@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c46d2898-12b0-43c3-8cf4-c6905e57f1a2

📥 Commits

Reviewing files that changed from the base of the PR and between 2462b30 and f9ab8ca.

📒 Files selected for processing (4)
  • internal/exporter/collector/collector.go
  • internal/exporter/collector/collector_test.go
  • internal/exporter/converter/otlp.go
  • internal/exporter/converter/otlp_test.go

📝 Walkthrough

Walkthrough

Component health collection now includes error messages and suggested actions in component data. OTLP conversion conditionally exports these fields as log attributes, with collector and converter tests covering populated and absent health-state values.

Changes

Component health export

Layer / File(s) Summary
Collect component health details
internal/exporter/collector/collector.go, internal/exporter/collector/collector_test.go
Component payloads now include error and suggested_actions, with tests covering populated values and no-health-state defaults.
Export component health attributes
internal/exporter/converter/otlp.go, internal/exporter/converter/otlp_test.go
OTLP component-data logs conditionally include non-empty error messages and JSON-marshalled suggested actions, with updated assertions.
Estimated code review effort: 3 (Moderate) ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant HealthState
  participant collectComponentData
  participant convertToOTLPLogs
  participant OTLPLogRecord
  HealthState->>collectComponentData: provide error and suggested actions
  collectComponentData->>convertToOTLPLogs: emit component data fields
  convertToOTLPLogs->>OTLPLogRecord: append conditional OTLP attributes
Loading

Suggested reviewers: jingxiang-z

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: exporting component state errors and suggested actions to the backend.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/export-state-error

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

@ambermingxin
ambermingxin requested a review from jingxiang-z July 23, 2026 20:09
@ambermingxin
ambermingxin merged commit 0c9b629 into main Jul 23, 2026
9 checks passed
@ambermingxin
ambermingxin deleted the fix/export-state-error branch July 23, 2026 22:18
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