From 64d2cc9093a42938bd68af6e75db6733983e10d1 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Nov 2022 11:54:35 -0800 Subject: [PATCH] [receiver/hostmetrics] Remove deprecated label from network metrics The label was missed to be removed once the metrics splitting was rolled back --- .chloggen/hostmetrics-remove-deprecated-label.yaml | 6 ++++++ .../internal/scraper/networkscraper/documentation.md | 8 ++++---- .../networkscraper/internal/metadata/generated_metrics.go | 8 ++++---- .../internal/scraper/networkscraper/metadata.yaml | 8 ++++---- 4 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 .chloggen/hostmetrics-remove-deprecated-label.yaml diff --git a/.chloggen/hostmetrics-remove-deprecated-label.yaml b/.chloggen/hostmetrics-remove-deprecated-label.yaml new file mode 100644 index 000000000000..ef95ff2e2e15 --- /dev/null +++ b/.chloggen/hostmetrics-remove-deprecated-label.yaml @@ -0,0 +1,6 @@ +change_type: bug_fix +component: receiver/hostmetrics +note: Remove "Deprecated" label from network metrics +issues: [16227] +subtext: | + Replacement of the metrics was rejected some time ago, but the labels were not updated. diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/documentation.md b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/documentation.md index cae9f0432775..624c6a236d01 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/documentation.md +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/documentation.md @@ -11,10 +11,10 @@ These are the metrics available for this scraper. | **system.network.connections** | The number of connections. | {connections} | Sum(Int) | | | system.network.conntrack.count | The count of entries in conntrack table. | {entries} | Sum(Int) | | | system.network.conntrack.max | The limit for entries in the conntrack table. | {entries} | Sum(Int) | | -| **system.network.dropped** | The number of packets dropped. (Deprecated) | {packets} | Sum(Int) | | -| **system.network.errors** | The number of errors encountered. (Deprecated) | {errors} | Sum(Int) | | -| **system.network.io** | The number of bytes transmitted and received. (Deprecated) | By | Sum(Int) | | -| **system.network.packets** | The number of packets transferred. (Deprecated) | {packets} | Sum(Int) | | +| **system.network.dropped** | The number of packets dropped. | {packets} | Sum(Int) | | +| **system.network.errors** | The number of errors encountered. | {errors} | Sum(Int) | | +| **system.network.io** | The number of bytes transmitted and received. | By | Sum(Int) | | +| **system.network.packets** | The number of packets transferred. | {packets} | Sum(Int) | | **Highlighted metrics** are emitted by default. Other metrics are optional and not emitted by default. Any metric can be enabled or disabled with the following scraper configuration: diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/generated_metrics.go b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/generated_metrics.go index 2a4f531ad6bf..1c76af652354 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/generated_metrics.go +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/generated_metrics.go @@ -286,7 +286,7 @@ type metricSystemNetworkDropped struct { // init fills system.network.dropped metric with initial data. func (m *metricSystemNetworkDropped) init() { m.data.SetName("system.network.dropped") - m.data.SetDescription("The number of packets dropped. (Deprecated)") + m.data.SetDescription("The number of packets dropped.") m.data.SetUnit("{packets}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -340,7 +340,7 @@ type metricSystemNetworkErrors struct { // init fills system.network.errors metric with initial data. func (m *metricSystemNetworkErrors) init() { m.data.SetName("system.network.errors") - m.data.SetDescription("The number of errors encountered. (Deprecated)") + m.data.SetDescription("The number of errors encountered.") m.data.SetUnit("{errors}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -394,7 +394,7 @@ type metricSystemNetworkIo struct { // init fills system.network.io metric with initial data. func (m *metricSystemNetworkIo) init() { m.data.SetName("system.network.io") - m.data.SetDescription("The number of bytes transmitted and received. (Deprecated)") + m.data.SetDescription("The number of bytes transmitted and received.") m.data.SetUnit("By") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) @@ -448,7 +448,7 @@ type metricSystemNetworkPackets struct { // init fills system.network.packets metric with initial data. func (m *metricSystemNetworkPackets) init() { m.data.SetName("system.network.packets") - m.data.SetDescription("The number of packets transferred. (Deprecated)") + m.data.SetDescription("The number of packets transferred.") m.data.SetUnit("{packets}") m.data.SetEmptySum() m.data.Sum().SetIsMonotonic(true) diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/metadata.yaml b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/metadata.yaml index 18d52d34f3fd..6a163b1ebd9f 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/metadata.yaml +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/metadata.yaml @@ -17,7 +17,7 @@ attributes: metrics: system.network.packets: enabled: true - description: The number of packets transferred. (Deprecated) + description: The number of packets transferred. unit: "{packets}" sum: value_type: int @@ -26,7 +26,7 @@ metrics: attributes: [device, direction] system.network.dropped: enabled: true - description: The number of packets dropped. (Deprecated) + description: The number of packets dropped. unit: "{packets}" sum: value_type: int @@ -35,7 +35,7 @@ metrics: attributes: [device, direction] system.network.errors: enabled: true - description: The number of errors encountered. (Deprecated) + description: The number of errors encountered. unit: "{errors}" sum: value_type: int @@ -44,7 +44,7 @@ metrics: attributes: [device, direction] system.network.io: enabled: true - description: The number of bytes transmitted and received. (Deprecated) + description: The number of bytes transmitted and received. unit: "By" sum: value_type: int