Skip to content

Add path for optics error counters#1459

Open
sallylsy wants to merge 4 commits intoopenconfig:masterfrom
sallylsy:optics_counters_0325
Open

Add path for optics error counters#1459
sallylsy wants to merge 4 commits intoopenconfig:masterfrom
sallylsy:optics_counters_0325

Conversation

@sallylsy
Copy link
Copy Markdown
Contributor

@sallylsy sallylsy commented Mar 26, 2026

Change Scope

  • Add counter paths to indicate number of errors in optical per physical lane.
  • This change is backwards compatible.

Platform Implementations

Tree View

 module: openconfig-platform
   +--rw components
      +--rw component* [name]
         +--rw oc-transceiver:transceiver
         |  +--rw oc-transceiver:physical-channels
         |  |  +--rw oc-transceiver:channel* [index]
         |  |     +--ro oc-transceiver:state
         |  |        +--ro oc-transceiver:index?                        uint16
         |  |        +--ro oc-transceiver:associated-optical-channel?   -> /oc-platform:components/component/name
         |  |        +--ro oc-transceiver:description?                  string
         |  |        +--ro oc-transceiver:tx-laser?                     boolean
         |  |        +--ro oc-transceiver:target-output-power?          decimal64
         |  |        +--ro oc-transceiver:laser-age?                    oc-types:percentage
         |  |        +--ro oc-transceiver:laser-temperature
         |  |        |  +--ro oc-transceiver:instant?    decimal64
         |  |        |  +--ro oc-transceiver:avg?        decimal64
         |  |        |  +--ro oc-transceiver:min?        decimal64
         |  |        |  +--ro oc-transceiver:max?        decimal64
         |  |        |  +--ro oc-transceiver:interval?   oc-types:stat-interval
         |  |        |  +--ro oc-transceiver:min-time?   oc-types:timeticks64
         |  |        |  +--ro oc-transceiver:max-time?   oc-types:timeticks64
         |  |        +--ro oc-transceiver:target-frequency-deviation
         |  |        |  +--ro oc-transceiver:instant?    decimal64
         |  |        |  +--ro oc-transceiver:avg?        decimal64
         |  |        |  +--ro oc-transceiver:min?        decimal64
         |  |        |  +--ro oc-transceiver:max?        decimal64
         |  |        |  +--ro oc-transceiver:interval?   oc-types:stat-interval
         |  |        |  +--ro oc-transceiver:min-time?   oc-types:timeticks64
         |  |        |  +--ro oc-transceiver:max-time?   oc-types:timeticks64
         |  |        +--ro oc-transceiver:tec-current
         |  |        |  +--ro oc-transceiver:instant?    decimal64
         |  |        |  +--ro oc-transceiver:avg?        decimal64
         |  |        |  +--ro oc-transceiver:min?        decimal64
         |  |        |  +--ro oc-transceiver:max?        decimal64
         |  |        |  +--ro oc-transceiver:interval?   oc-types:stat-interval
         |  |        |  +--ro oc-transceiver:min-time?   oc-types:timeticks64
         |  |        |  +--ro oc-transceiver:max-time?   oc-types:timeticks64
         |  |        +--ro oc-transceiver:tx-failure?                   boolean
         |  |        +--ro oc-transceiver:rx-los?                       boolean
         |  |        +--ro oc-transceiver:rx-cdr-lol?                   boolean
+        |  |        +--ro oc-transceiver:counters
+        |  |        |  +--ro oc-transceiver:tx-fault-count?   oc-yang:counter64
+        |  |        |  +--ro oc-transceiver:tx-los-count?     oc-yang:counter64
+        |  |        |  +--ro oc-transceiver:tx-lol-count?     oc-yang:counter64
+        |  |        |  +--ro oc-transceiver:rx-los-count?     oc-yang:counter64
+        |  |        |  +--ro oc-transceiver:rx-lol-count?     oc-yang:counter64
+        |  |        +--ro oc-transceiver:host-snr
+        |  |        |  +--ro oc-transceiver:instant?    decimal64
+        |  |        |  +--ro oc-transceiver:avg?        decimal64
+        |  |        |  +--ro oc-transceiver:min?        decimal64
+        |  |        |  +--ro oc-transceiver:max?        decimal64
+        |  |        |  +--ro oc-transceiver:interval?   oc-types:stat-interval
+        |  |        |  +--ro oc-transceiver:min-time?   oc-types:timeticks64
+        |  |        |  +--ro oc-transceiver:max-time?   oc-types:timeticks64
+        |  |        +--ro oc-transceiver:media-snr
+        |  |        |  +--ro oc-transceiver:instant?    decimal64
+        |  |        |  +--ro oc-transceiver:avg?        decimal64
+        |  |        |  +--ro oc-transceiver:min?        decimal64
+        |  |        |  +--ro oc-transceiver:max?        decimal64
+        |  |        |  +--ro oc-transceiver:interval?   oc-types:stat-interval
+        |  |        |  +--ro oc-transceiver:min-time?   oc-types:timeticks64
+        |  |        |  +--ro oc-transceiver:max-time?   oc-types:timeticks64

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds several lane-specific metrics to the OpenConfig platform transceiver model, including fault counters, loss of signal/lock counters, and signal-to-noise ratio (SNR) measurements for both host and media sides. The review feedback identifies indentation errors and notes that host-side metrics were incorrectly placed within a media-side grouping, suggesting they be moved to the appropriate host-lane-state grouping.

Comment thread release/models/platform/openconfig-platform-transceiver.yang Outdated
@sallylsy sallylsy force-pushed the optics_counters_0325 branch from 7b0495a to a767d80 Compare March 26, 2026 19:47
@ElodinLaarz
Copy link
Copy Markdown
Contributor

Discussed at OC Operators Meeting March 31, 2026:

Can we move the counters into a container?

Also, if the snr values represent the instantaneous value and we care about min/max etc. we could structure it similar to the other containers (oc-transceiver:tec-current etc.)

@sallylsy
Copy link
Copy Markdown
Contributor Author

Action items:

  1. Wrap all *-count to a counters containers
  2. *-snr should have instant, avg, min, max, interval, min-time, max-time

@sallylsy sallylsy force-pushed the optics_counters_0325 branch from a767d80 to e9aafc1 Compare April 1, 2026 19:22
@ElodinLaarz
Copy link
Copy Markdown
Contributor

/gcbrun

@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented Apr 2, 2026

No major YANG version changes in commit 3d75b33

@sallylsy sallylsy force-pushed the optics_counters_0325 branch from e9aafc1 to c312166 Compare April 2, 2026 18:58
@ElodinLaarz
Copy link
Copy Markdown
Contributor

/gcbrun

@ElodinLaarz
Copy link
Copy Markdown
Contributor

/gcbrun

@ElodinLaarz ElodinLaarz moved this to Ready to discuss in OC Operator Review Apr 7, 2026
@dplore
Copy link
Copy Markdown
Member

dplore commented Apr 14, 2026

Will review at April 14, 2026 OC Operators meeting

(i.e. gray optic) that it is associated with.";

oc-ext:openconfig-version "0.18.0";
oc-ext:openconfig-version "0.19.0";
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.

Is this model being used? Do we want to increment to 1.X.X?

@ElodinLaarz
Copy link
Copy Markdown
Contributor

Discussed at the OC Operators Meeting April 14th, 2026:

The model looks a lot better-- thanks for making the changes.

No objections to the OC addition. Will set last call for 2 weeks from now.

@ElodinLaarz ElodinLaarz moved this from Ready to discuss to last-call in OC Operator Review Apr 14, 2026
@ElodinLaarz
Copy link
Copy Markdown
Contributor

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: last-call

Development

Successfully merging this pull request may close these issues.

5 participants