Skip to content

Handle unsupported metrics, rename protobuf field - #968

Merged
JaewonHur merged 1 commit into
apple:mainfrom
JaewonHur:handle-unsupported-metrics
Oct 15, 2026
Merged

JaewonHur merged 1 commit into
apple:mainfrom
JaewonHur:handle-unsupported-metrics

Conversation

@JaewonHur

Copy link
Copy Markdown
Contributor
  • Make partially supported fields in NetworkProtocolCounters of protobuf optional. Those fields are {received,transmitted}_bytes, {received,transmitted}_drops, {received,transmitted}_errors.
    Instead of filling unsupported metrics value with 0, leave them nil so that receiver can distinguish it.

  • Rename protocol to network_protocol in protobuf. The same in ContainerStatistics (i.e., protocol to networkProtocol).

* Make partially supported fields in `NetworkProtocolCounters` of
  protobuf optional. Those fields are `{received,transmitted}_bytes`,
  `{received,transmitted}_drops`, `{received,transmitted}_errors`.

  Instead of filling unsupported metrics value with 0, leave them nil so
  that receiver can distinguish it.

* Rename `protocol` to `network_protocol` in protobuf. The same in
  `ContainerStatistics` (i.e., `protocol` to `networkProtocol`).
@JaewonHur
JaewonHur force-pushed the handle-unsupported-metrics branch from 6030c0d to 29dc0c0 Compare October 15, 2026 22:07
@JaewonHur
JaewonHur merged commit cc8d321 into apple:main Oct 15, 2026
7 checks passed
public var receivedErrors: UInt64
public var transmittedErrors: UInt64
public var receivedErrors: UInt64?
public var transmittedErrors: UInt64?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was this actually needed? Making these counters optional breaks the callers.

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