Skip to content

Conversation

@rjarry
Copy link
Collaborator

@rjarry rjarry commented Jan 30, 2026

Add the interface mode as a label to metrics. When the interface is in VRF mode, include the vrf label as before. For other modes (bridge, bond, xc), include a domain label with the name of the parent interface to which this interface is attached.

This allows monitoring dashboards to group interfaces by their operating mode and identify which bridge or bond they belong to.

Summary by CodeRabbit

  • Improvements
    • Interface metrics now include a new "mode" label and are labeled conditionally as either VRF-specific or domain-specific (with domain name shown or marked deleted). This yields clearer, more accurate metrics for interface behavior and easier operational visibility.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

📝 Walkthrough

Walkthrough

The iface_metrics_collect function changes metric labeling: the initial inline VRF label is removed. The metric context now always includes name, type, and a new mode label. If iface->mode is GR_IFACE_MODE_VRF, a vrf label is added from iface->vrf_id; otherwise the code resolves the domain via iface_from_id(iface->domain_id) and adds a domain label with the domain name or "[deleted]" as a fallback. Only the label construction/control flow for metric emission was modified.

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Add the interface mode as a label to metrics. When the interface is in
VRF mode, include the vrf label as before. For other modes (bridge,
bond, xc), include a domain label with the name of the parent interface
to which this interface is attached.

This allows monitoring dashboards to group interfaces by their operating
mode and identify which bridge or bond they belong to.

Signed-off-by: Robin Jarry <rjarry@redhat.com>
Reviewed-by: Christophe Fontaine <cfontain@redhat.com>
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