Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

Summary

Fixes #21239

OTEL metrics appear as flat, ungrouped items in the dashboard because the family field uses dots as separators. This change replaces dots with slashes in metric family names to enable hierarchical grouping.

Before: otel.dotnet.exceptions (flat)
After: dotnet/exceptions (grouped under dotnet)

Changes:

  • Rust plugin (src/crates/jf/otel-plugin/src/netdata_chart.rs): Generate family by replacing dots with slashes in the metric name
Test Plan
  • Rust: cargo check passes
Additional Information

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@ilyam8
Copy link
Member

ilyam8 commented Dec 1, 2025

@copilot the fix is very simple - we need to replace dots with / for metric families (only family, not chart id or anything else), e.g. otel.dotnet.exceptions => otel/dotnet/exceptions.

@ilyam8
Copy link
Member

ilyam8 commented Dec 1, 2025

@copilot

Modify the Go plugin (src/go/otel-collector/exporter/netdataexporter/convert.go) to replace dots with slashes in the family field

No. You don't need to modify any go code. otel is rust only.

…ouping

Modified both the Rust and Go OTEL plugins to use slashes instead of dots
in the family field, enabling hierarchical grouping in the dashboard.

For example:
- Before: otel.dotnet.exceptions
- After: otel/dotnet/exceptions

Also fixed a pre-existing bug in convert_test.go where Convert was called
instead of convert (lowercase).

Co-authored-by: ilyam8 <[email protected]>
Copilot AI changed the title [WIP] Fix OTEL metrics grouping in dashboard Replace dots with slashes in OTEL metric families for hierarchical grouping Dec 1, 2025
Copilot AI requested a review from ilyam8 December 1, 2025 13:38
Removed modifications to Go otel-collector code as per review feedback.
The OTEL plugin is Rust-only. The fix only needs to replace dots with
slashes in the family field in the Rust plugin.

Co-authored-by: ilyam8 <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 1, 2025

@copilot

Modify the Go plugin (src/go/otel-collector/exporter/netdataexporter/convert.go) to replace dots with slashes in the family field
...

Reverted all Go changes in 4c50bb1. The fix now only modifies the Rust plugin's family field.

@ilyam8 ilyam8 marked this pull request as ready for review December 1, 2025 17:03
@ilyam8 ilyam8 requested a review from Ferroin as a code owner December 1, 2025 17:03
@ilyam8
Copy link
Member

ilyam8 commented Dec 1, 2025

@copilot remove "otel/" prefix in the family, we don't need it.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

The family field should just use the metric name with dots replaced by slashes,
without the otel/ prefix (e.g., dotnet/exceptions instead of otel/dotnet/exceptions).

Co-authored-by: ilyam8 <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 1, 2025

@copilot remove "otel/" prefix in the family, we don't need it.

Removed the "otel/" prefix in 0abaa42. The family field now uses just the metric name with dots replaced by slashes (e.g., dotnet/exceptions).

@Ferroin Ferroin requested a review from vkalintiris December 2, 2025 17:28
@Ferroin
Copy link
Member

Ferroin commented Dec 2, 2025

Flagging @vkalintiris for review on this as he’s the de-facto code owner.

@ilyam8
Copy link
Member

ilyam8 commented Dec 3, 2025

After this change

Screenshot 2025-12-03 at 12 07 34

@ilyam8 ilyam8 merged commit d7f3bf3 into master Dec 3, 2025
118 of 166 checks passed
@ilyam8 ilyam8 deleted the copilot/fix-otel-metrics-grouping branch December 3, 2025 10:09
stelfrag pushed a commit to stelfrag/netdata that referenced this pull request Dec 3, 2025
…ouping (netdata#21371)

Co-authored-by: ilyam8 <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
(cherry picked from commit d7f3bf3)
@stelfrag stelfrag mentioned this pull request Dec 3, 2025
Ferroin pushed a commit that referenced this pull request Dec 3, 2025
…ouping (#21371)

Co-authored-by: ilyam8 <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
(cherry picked from commit d7f3bf3)
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.

[Bug]: OTEL metrics are not grouped in the dashboard

4 participants