From 1302b88e75bb50c4746635308547efc5999868a9 Mon Sep 17 00:00:00 2001 From: dkirov-dd <166512750+dkirov-dd@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:38:31 +0200 Subject: [PATCH] Add AWS Neuron metric origin (#28088) --- pkg/metrics/metricsource.go | 5 +++++ pkg/serializer/internal/metrics/origin_mapping.go | 5 ++++- .../notes/aws_neuron_origin-98d361379b1c1a7b.yaml | 11 +++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/aws_neuron_origin-98d361379b1c1a7b.yaml diff --git a/pkg/metrics/metricsource.go b/pkg/metrics/metricsource.go index ebbe9c494cc02..6de3688917112 100644 --- a/pkg/metrics/metricsource.go +++ b/pkg/metrics/metricsource.go @@ -290,6 +290,7 @@ const ( MetricSourceWmiCheck MetricSourceYarn MetricSourceZk + MetricSourceAwsNeuron ) // String returns a string representation of MetricSource @@ -841,6 +842,8 @@ func (ms MetricSource) String() string { return "zabbix" case MetricSourceZenohRouter: return "zenoh_router" + case MetricSourceAwsNeuron: + return "aws_neuron" default: return "" } @@ -1361,6 +1364,8 @@ func CheckNameToMetricSource(name string) MetricSource { return MetricSourceZabbix case "zenoh_router": return MetricSourceZenohRouter + case "aws_neuron": + return MetricSourceAwsNeuron default: return MetricSourceUnknown } diff --git a/pkg/serializer/internal/metrics/origin_mapping.go b/pkg/serializer/internal/metrics/origin_mapping.go index 6d1c9836da493..0678069301d07 100644 --- a/pkg/serializer/internal/metrics/origin_mapping.go +++ b/pkg/serializer/internal/metrics/origin_mapping.go @@ -289,7 +289,8 @@ func metricSourceToOriginCategory(ms metrics.MetricSource) int32 { metrics.MetricSourceWindowsService, metrics.MetricSourceWmiCheck, metrics.MetricSourceYarn, - metrics.MetricSourceZk: + metrics.MetricSourceZk, + metrics.MetricSourceAwsNeuron: return 11 // integrationMetrics default: return 0 @@ -847,6 +848,8 @@ func metricSourceToOriginService(ms metrics.MetricSource) int32 { return 399 case metrics.MetricSourceVllm: return 412 + case metrics.MetricSourceAwsNeuron: + return 413 default: return 0 } diff --git a/releasenotes/notes/aws_neuron_origin-98d361379b1c1a7b.yaml b/releasenotes/notes/aws_neuron_origin-98d361379b1c1a7b.yaml new file mode 100644 index 0000000000000..17ebb0866b9dc --- /dev/null +++ b/releasenotes/notes/aws_neuron_origin-98d361379b1c1a7b.yaml @@ -0,0 +1,11 @@ +# Each section from every release note are combined when the +# CHANGELOG.rst is rendered. So the text needs to be worded so that +# it does not depend on any information only available in another +# section. This may mean repeating some details, but each section +# must be readable independently of the other. +# +# Each section note must be formatted as reStructuredText. +--- +other: + - | + Add metric origin for the AWS Neuron integration