Skip to content

Commit d483655

Browse files
committed
Revert "expose FlowMetric help and autogenerate defaults"
This reverts commit 4ce3c75.
1 parent 4ce3c75 commit d483655

File tree

9 files changed

+1
-33
lines changed

9 files changed

+1
-33
lines changed

api/flowmetrics/v1alpha1/flowmetric_types.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ type FlowMetricSpec struct {
7676
// +required
7777
Type MetricType `json:"type"`
7878

79-
// Help text of the metric, as it appears in Prometheus.
80-
// +optional
81-
Help string `json:"help,omitempty"`
82-
8379
// `valueField` is the flow field that must be used as a value for this metric (for example: `Bytes`). This field must hold numeric values.
8480
// Leave empty to count flows rather than a specific value per flow.
8581
// Refer to the documentation for the list of available fields: https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/network_observability/json-flows-format-reference.

bundle/manifests/flows.netobserv.io_flowmetrics.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ spec:
192192
items:
193193
type: string
194194
type: array
195-
help:
196-
description: Help text of the metric, as it appears in Prometheus.
197-
type: string
198195
labels:
199196
description: |-
200197
`labels` is a list of fields that should be used as Prometheus labels, also known as dimensions (for example: `SrcK8S_Namespace`).

bundle/manifests/netobserv-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ metadata:
253253
categories: Monitoring, Networking, Observability
254254
console.openshift.io/plugins: '["netobserv-plugin"]'
255255
containerImage: quay.io/netobserv/network-observability-operator:1.9.2-community
256-
createdAt: "2025-10-01T10:32:51Z"
256+
createdAt: "2025-09-30T17:05:14Z"
257257
description: Network flows collector and monitoring solution
258258
operatorframework.io/initialization-resource: '{"apiVersion":"flows.netobserv.io/v1beta2",
259259
"kind":"FlowCollector","metadata":{"name":"cluster"},"spec": {}}'

config/crd/bases/flows.netobserv.io_flowmetrics.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ spec:
192192
items:
193193
type: string
194194
type: array
195-
help:
196-
description: Help text of the metric, as it appears in Prometheus.
197-
type: string
198195
labels:
199196
description: |-
200197
`labels` is a list of fields that should be used as Prometheus labels, also known as dimensions (for example: `SrcK8S_Namespace`).

docs/FlowMetric.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,6 @@ Refer to the documentation for the list of available fields: https://docs.redhat
152152
For instance, when flattening `Interfaces` on a bytes counter, a flow having Interfaces [br-ex, ens5] increases one counter for `br-ex` and another for `ens5`.<br/>
153153
</td>
154154
<td>false</td>
155-
</tr><tr>
156-
<td><b>help</b></td>
157-
<td>string</td>
158-
<td>
159-
Help text of the metric, as it appears in Prometheus.<br/>
160-
</td>
161-
<td>false</td>
162155
</tr><tr>
163156
<td><b>labels</b></td>
164157
<td>[]string</td>

helm/crds/flows.netobserv.io_flowmetrics.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ spec:
180180
items:
181181
type: string
182182
type: array
183-
help:
184-
description: Help text of the metric, as it appears in Prometheus.
185-
type: string
186183
labels:
187184
description: |-
188185
`labels` is a list of fields that should be used as Prometheus labels, also known as dimensions (for example: `SrcK8S_Namespace`).

internal/controller/flp/flp_pipeline_builder.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,6 @@ func flowMetricToFLP(fm *metricslatest.FlowMetric) (*api.MetricsItem, error) {
409409
m := &api.MetricsItem{
410410
Name: metricName,
411411
Type: api.MetricEncodeOperationEnum(strings.ToLower(string(fm.Spec.Type))),
412-
Help: fm.Spec.Help,
413412
Filters: []api.MetricsFilter{},
414413
Labels: fm.Spec.Labels,
415414
Remap: remap,

internal/pkg/helper/otel/otel_config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ func GetOtelMetrics(flpMetrics []api.MetricsItem) ([]api.MetricsItem, error) {
8989
otelMetrics = append(otelMetrics, api.MetricsItem{
9090
Name: convertToOtelLabel(otelRules, m.Name),
9191
Type: m.Type,
92-
Help: m.Help,
9392
Filters: convertToOtelFilters(otelRules, m.Filters),
9493
ValueKey: convertToOtelLabel(otelRules, m.ValueKey),
9594
Labels: convertToOtelLabels(otelRules, m.Labels),

internal/pkg/metrics/predefined_metrics.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ func init() {
5656
FlowMetricSpec: metricslatest.FlowMetricSpec{
5757
MetricName: fmt.Sprintf("%s_%s_%s_total", groupTrimmed, lowDir, vt),
5858
Type: metricslatest.CounterMetric,
59-
Help: fmt.Sprintf("Total %s per %s in %s direction", vt, groupTrimmed, lowDir),
6059
ValueField: valueField,
6160
Direction: dir,
6261
Labels: labels,
@@ -71,7 +70,6 @@ func init() {
7170
FlowMetricSpec: metricslatest.FlowMetricSpec{
7271
MetricName: fmt.Sprintf("%s_sampling", groupTrimmed),
7372
Type: metricslatest.GaugeMetric,
74-
Help: fmt.Sprintf("Sampling per %s", groupTrimmed),
7573
ValueField: "Sampling",
7674
Labels: labels,
7775
},
@@ -82,7 +80,6 @@ func init() {
8280
FlowMetricSpec: metricslatest.FlowMetricSpec{
8381
MetricName: fmt.Sprintf("%s_flows_total", groupTrimmed),
8482
Type: "counter",
85-
Help: fmt.Sprintf("Total flows per %s", groupTrimmed),
8683
Labels: labels,
8784
},
8885
tags: []string{group, group + "-flows", "flows"},
@@ -96,7 +93,6 @@ func init() {
9693
FlowMetricSpec: metricslatest.FlowMetricSpec{
9794
MetricName: fmt.Sprintf("%s_rtt_seconds", groupTrimmed),
9895
Type: metricslatest.HistogramMetric,
99-
Help: fmt.Sprintf("Round-trip time latency in seconds per %s", groupTrimmed),
10096
ValueField: "TimeFlowRttNs",
10197
Filters: []metricslatest.MetricFilter{
10298
{Field: "TimeFlowRttNs", MatchType: metricslatest.MatchPresence},
@@ -119,7 +115,6 @@ func init() {
119115
FlowMetricSpec: metricslatest.FlowMetricSpec{
120116
MetricName: fmt.Sprintf("%s_drop_packets_total", groupTrimmed),
121117
Type: metricslatest.CounterMetric,
122-
Help: fmt.Sprintf("Total dropped packets per %s", groupTrimmed),
123118
ValueField: "PktDropPackets",
124119
Filters: []metricslatest.MetricFilter{
125120
{Field: "PktDropPackets", MatchType: metricslatest.MatchPresence},
@@ -133,7 +128,6 @@ func init() {
133128
FlowMetricSpec: metricslatest.FlowMetricSpec{
134129
MetricName: fmt.Sprintf("%s_drop_bytes_total", groupTrimmed),
135130
Type: metricslatest.CounterMetric,
136-
Help: fmt.Sprintf("Total dropped bytes per %s", groupTrimmed),
137131
ValueField: "PktDropBytes",
138132
Filters: []metricslatest.MetricFilter{
139133
{Field: "PktDropBytes", MatchType: metricslatest.MatchPresence},
@@ -154,7 +148,6 @@ func init() {
154148
FlowMetricSpec: metricslatest.FlowMetricSpec{
155149
MetricName: fmt.Sprintf("%s_dns_latency_seconds", groupTrimmed),
156150
Type: metricslatest.HistogramMetric,
157-
Help: fmt.Sprintf("DNS latency in seconds per %s", groupTrimmed),
158151
ValueField: "DnsLatencyMs",
159152
Filters: []metricslatest.MetricFilter{
160153
{Field: "DnsId", MatchType: metricslatest.MatchPresence},
@@ -178,7 +171,6 @@ func init() {
178171
FlowMetricSpec: metricslatest.FlowMetricSpec{
179172
MetricName: fmt.Sprintf("%s_network_policy_events_total", groupTrimmed),
180173
Type: "counter",
181-
Help: fmt.Sprintf("Total network policy events per %s", groupTrimmed),
182174
Labels: netpolLabels,
183175
Filters: []metricslatest.MetricFilter{{Field: "NetworkEvents>Feature", Value: "acl"}},
184176
Flatten: []string{"NetworkEvents"},
@@ -205,7 +197,6 @@ func init() {
205197
FlowMetricSpec: metricslatest.FlowMetricSpec{
206198
MetricName: fmt.Sprintf("%s_ipsec_flows_total", groupTrimmed),
207199
Type: metricslatest.CounterMetric,
208-
Help: fmt.Sprintf("Total IPsec encrypted flows per %s", groupTrimmed),
209200
Filters: []metricslatest.MetricFilter{{Field: "IPSecStatus", MatchType: metricslatest.MatchPresence}},
210201
Labels: ipsecLabels,
211202
Charts: ipsecStatusChart(group),
@@ -218,7 +209,6 @@ func init() {
218209
FlowMetricSpec: metricslatest.FlowMetricSpec{
219210
MetricName: "node_to_node_ingress_flows_total",
220211
Type: metricslatest.CounterMetric,
221-
Help: "Total ingress flows between nodes",
222212
Labels: mapLabels[tagNodes],
223213
Filters: []metricslatest.MetricFilter{
224214
{Field: "FlowDirection", Value: "2", MatchType: metricslatest.MatchNotEqual},

0 commit comments

Comments
 (0)