From 8d0938c1933fb54e9095423155447fff339ad313 Mon Sep 17 00:00:00 2001 From: Ilia Kurenkov Date: Mon, 16 Dec 2024 12:11:10 +0100 Subject: [PATCH 1/2] Add metrics origins for Quarkus integration --- pkg/metrics/metricsource.go | 5 +++++ pkg/serializer/internal/metrics/origin_mapping.go | 3 +++ ...ins-for-Quarkus-integration.-e2ff9ac00b7ea6df.yaml | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 releasenotes/notes/Add-metrics-origins-for-Quarkus-integration.-e2ff9ac00b7ea6df.yaml diff --git a/pkg/metrics/metricsource.go b/pkg/metrics/metricsource.go index f3afa888d60b4..45e73797bb964 100644 --- a/pkg/metrics/metricsource.go +++ b/pkg/metrics/metricsource.go @@ -308,6 +308,7 @@ const ( MetricSourceAnyscale MetricSourceMilvus MetricSourceNvidiaNim + MetricSourceMilvus ) // String returns a string representation of MetricSource @@ -879,6 +880,8 @@ func (ms MetricSource) String() string { return "aws_neuron" case MetricSourceMilvus: return "milvus" + case MetricSourceQuarkus: + return "quarkus" default: return "" } @@ -1421,6 +1424,8 @@ func CheckNameToMetricSource(name string) MetricSource { return MetricSourceTibcoEMS case "milvus": return MetricSourceMilvus + case "quarkus": + return MetricSourceQuarkus default: return MetricSourceUnknown } diff --git a/pkg/serializer/internal/metrics/origin_mapping.go b/pkg/serializer/internal/metrics/origin_mapping.go index 45e433d7135b5..02c54e1913363 100644 --- a/pkg/serializer/internal/metrics/origin_mapping.go +++ b/pkg/serializer/internal/metrics/origin_mapping.go @@ -308,6 +308,7 @@ func metricSourceToOriginCategory(ms metrics.MetricSource) int32 { metrics.MetricSourceZk, metrics.MetricSourceAwsNeuron, metrics.MetricSourceNvidiaNim, + metrics.MetricSourceQuarkus, metrics.MetricSourceMilvus: return 11 // integrationMetrics default: @@ -902,6 +903,8 @@ func metricSourceToOriginService(ms metrics.MetricSource) int32 { return 425 case metrics.MetricSourceNvidiaNim: return 426 + case metrics.MetricSourceQuarkus: + return 427 default: return 0 } diff --git a/releasenotes/notes/Add-metrics-origins-for-Quarkus-integration.-e2ff9ac00b7ea6df.yaml b/releasenotes/notes/Add-metrics-origins-for-Quarkus-integration.-e2ff9ac00b7ea6df.yaml new file mode 100644 index 0000000000000..6a23ab8155f8c --- /dev/null +++ b/releasenotes/notes/Add-metrics-origins-for-Quarkus-integration.-e2ff9ac00b7ea6df.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 metrics origins for Quarkus integration. From 38716cdb29d992a72a250649e5c903159a92875a Mon Sep 17 00:00:00 2001 From: Ilia Kurenkov Date: Mon, 16 Dec 2024 12:21:52 +0100 Subject: [PATCH 2/2] fix constant --- pkg/metrics/metricsource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/metrics/metricsource.go b/pkg/metrics/metricsource.go index 45e73797bb964..5fcc0ff956952 100644 --- a/pkg/metrics/metricsource.go +++ b/pkg/metrics/metricsource.go @@ -308,7 +308,7 @@ const ( MetricSourceAnyscale MetricSourceMilvus MetricSourceNvidiaNim - MetricSourceMilvus + MetricSourceQuarkus ) // String returns a string representation of MetricSource