Skip to content

Conversation

@tiyash-basu-frequenz
Copy link
Contributor

This commit changes the type of the metrics.MetricSample.connection field from string to a new message type metrics.MetricConnection.

This change allows for better categorization of the connection type, which can be useful in control and monitoring applications. The new MetricConnection message includes a MetricConnectionCategory enum that categorizes the connection type (e.g., battery, PV array, temperatures), and a name` field that can be used to identify the specific connection point from which the metric was obtained.

closes #258

@tiyash-basu-frequenz tiyash-basu-frequenz self-assigned this Jun 13, 2025
Copilot AI review requested due to automatic review settings June 13, 2025 13:30
@tiyash-basu-frequenz tiyash-basu-frequenz requested a review from a team as a code owner June 13, 2025 13:30
@github-actions github-actions bot added part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files labels Jun 13, 2025

This comment was marked as outdated.

@tiyash-basu-frequenz tiyash-basu-frequenz force-pushed the 258_metric_connection_category branch from bef78f0 to 3b5c6cd Compare June 13, 2025 13:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the type of the MetricSample.connection field from a simple string to the more expressive MetricConnection message, enabling more detailed categorization of connection types.

  • Added MetricConnectionCategory enum for various connection types.
  • Introduced MetricConnection message with fields for connection category and name.
  • Updated MetricSample to use an optional MetricConnection field for better distinction of connection sources.

Reviewed Changes

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

File Description
proto/frequenz/api/common/v1/metrics/metrics.proto Updated MetricSample and added new types for improving connection categorization.
RELEASE_NOTES.md Updated release notes to reflect the change in MetricSample.connection type.
Comments suppressed due to low confidence (1)

proto/frequenz/api/common/v1/metrics/metrics.proto:293

  • The example comment still refers to 'source { ... }' while the field is now 'connection'. Please update the example to reflect the new field name to avoid confusion.
// !!! example

@tiyash-basu-frequenz tiyash-basu-frequenz force-pushed the 258_metric_connection_category branch 2 times, most recently from 463d860 to 8a3034e Compare June 13, 2025 13:51
Copy link
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

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

So many questions...

@tiyash-basu-frequenz tiyash-basu-frequenz force-pushed the 258_metric_connection_category branch from 8a3034e to 591e422 Compare June 13, 2025 15:04
Copy link
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

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

Only one more thing.

@tiyash-basu-frequenz tiyash-basu-frequenz force-pushed the 258_metric_connection_category branch from 591e422 to 742af6f Compare June 13, 2025 15:28
@tiyash-basu-frequenz tiyash-basu-frequenz force-pushed the 258_metric_connection_category branch 2 times, most recently from 2824489 to 286386d Compare June 13, 2025 15:32
This commit changes the type of the `metrics.MetricSample.connection`
field from `string` to a new message type `metrics.MetricConnection`.

This change allows for better categorization of the connection type,
which can be useful in control and monitoring applications. The new
`MetricConnection` message includes a `MetricConnectionCategory` enum
that categorizes the connection type (e.g., battery, PV array,
temperature`s), and a `name` field that can be used to identify the
specific connection point from which the metric was obtained.

Signed-off-by: Tiyash Basu <[email protected]>
@tiyash-basu-frequenz tiyash-basu-frequenz force-pushed the 258_metric_connection_category branch from 286386d to 930bbcf Compare June 13, 2025 15:33
@tiyash-basu-frequenz tiyash-basu-frequenz added this pull request to the merge queue Jun 13, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit 4bbcdc8 Jun 13, 2025
6 checks passed
@tiyash-basu-frequenz tiyash-basu-frequenz deleted the 258_metric_connection_category branch June 13, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend definition for metric sources to include a category

2 participants