Skip to content

Add ComponentHealth.attributes#334

Open
michel-laterman wants to merge 3 commits into
open-telemetry:mainfrom
michel-laterman:enhancement/add-componenthealth-attributes
Open

Add ComponentHealth.attributes#334
michel-laterman wants to merge 3 commits into
open-telemetry:mainfrom
michel-laterman:enhancement/add-componenthealth-attributes

Conversation

@michel-laterman

Copy link
Copy Markdown
Contributor

Add attributes in order to be consistent with what the healthcheck extension produces. See extension source.

@michel-laterman michel-laterman requested a review from a team as a code owner May 12, 2026 16:28

@tigrannajaryan tigrannajaryan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What are "attributes" supposed to carry? We need a more elaborate motivation before accepting this change.

Looking at the extension event, it says "attributes provides additional context or metadata for the event" which is very vague to me.

@michel-laterman

Copy link
Copy Markdown
Contributor Author

For example the attributes of a hostmetrics scraper can include things to indicate specifics on which scrapers are failing, as seen in the extension issue is:

    "pipeline:metrics/1": {
      "healthy": true,
      "status": "StatusRecoverableError",
      "status_time": "2025-10-16T17:56:11.820542393+02:00",
      "attributes": {
        "error_msg": "not enough permissions to read cpu data",
        "scrapers": ["cpu", "memory", "network"]
      },

extension implementation pr.

It could further be used to indicate other metadata such as port numbers, address, etc.

@tigrannajaryan tigrannajaryan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@michel-laterman sorry for late review. I think it makes sense for us to mirror the structure of the status that the Collector has.

Comment thread proto/opamp.proto
@tigrannajaryan

Copy link
Copy Markdown
Member

I will keep this open for a while in case @andykellr or @evan-bradley have comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Extends the OpAMP ComponentHealth message to include attributes, aligning the spec and protobuf definition with the metadata produced by the OpenTelemetry Collector healthcheck/componentstatus model (Issue #326).

Changes:

  • Added ComponentHealth.attributes to the specification, including TOC entry and field documentation.
  • Added repeated KeyValue attributes = 7; to ComponentHealth in proto/opamp.proto with matching comments.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
specification.md Documents the new ComponentHealth.attributes field and adds it to the ComponentHealth section/TOC.
proto/opamp.proto Adds the attributes field to the ComponentHealth protobuf message (field number 7).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread proto/opamp.proto

// Additional context or metadata for the observed component's status.
// Attributes are component specific and outside the concerns of the OpAMP protocol.
repeated KeyValue attributes = 7;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please mark with // Status: [Development] (see other similar fields in this proto).

@tigrannajaryan

Copy link
Copy Markdown
Member

Please resolve the conflict.

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.

Add attributes to ComponentHealth messages

3 participants