diff options
author | 2025-02-12 15:08:01 +0000 | |
---|---|---|
committer | 2025-02-18 15:14:58 +0000 | |
commit | 7eb1c59ddf1c84d7698369b1232f43e4f71f89aa (patch) | |
tree | 172e55d1913930479431e882dca34a66831a79b3 /reception | |
parent | f9ecc3d06b8240ab87b8f46a9c0b0dc44dfab148 (diff) |
Uplift prometheus dependencies
Issue-ID: POLICY-5190
Change-Id: I1a6c91cbcaf4e71bee768b74ee34ba914443a03e
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'reception')
-rw-r--r-- | reception/pom.xml | 8 | ||||
-rw-r--r-- | reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java | 15 |
2 files changed, 12 insertions, 11 deletions
diff --git a/reception/pom.xml b/reception/pom.xml index f9eafecb..67d6a94c 100644 --- a/reception/pom.xml +++ b/reception/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= Copyright (C) 2018 Ericsson. All rights reserved. Modifications Copyright (C) 2022 Bell Canada. All rights reserved. - Modifications Copyright (C) 2024 Nordix Foundation. + Modifications Copyright (C) 2024-2025 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -55,16 +55,16 @@ </dependency> <dependency> <groupId>io.prometheus</groupId> - <artifactId>simpleclient</artifactId> + <artifactId>prometheus-metrics-core</artifactId> </dependency> <dependency> <groupId>io.prometheus</groupId> - <artifactId>simpleclient_servlet_jakarta</artifactId> + <artifactId>prometheus-metrics-exporter-servlet-jakarta</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>io.prometheus</groupId> - <artifactId>simpleclient_hotspot</artifactId> + <artifactId>prometheus-metrics-instrumentation-jvm</artifactId> <scope>runtime</scope> </dependency> </dependencies> diff --git a/reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java b/reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java index 5a6b76a8..8957cd05 100644 --- a/reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java +++ b/reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2022 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2025 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +22,7 @@ package org.onap.policy.distribution.reception.statistics; -import io.prometheus.client.Counter; +import io.prometheus.metrics.core.metrics.Counter; /** * Class to hold statistical data for distribution component. @@ -30,26 +31,26 @@ import io.prometheus.client.Counter; */ public class DistributionStatisticsManager { - private static final Counter TOTAL_DISTRIBUTION_RECEIVED_COUNT = Counter.build() + private static final Counter TOTAL_DISTRIBUTION_RECEIVED_COUNT = Counter.builder() .name("total_distribution_received_count") .help("Total number of distribution received.").register(); - private static final Counter DISTRIBUTION_SUCCESS_COUNT = Counter.build() + private static final Counter DISTRIBUTION_SUCCESS_COUNT = Counter.builder() .name("distribution_success_count") .help("Total number of distribution successfully processed.").register(); - private static final Counter DISTRIBUTION_FAILURE_COUNT = Counter.build() + private static final Counter DISTRIBUTION_FAILURE_COUNT = Counter.builder() .name("distribution_failure_count") .help("Total number of distribution failures.").register(); - private static final Counter TOTAL_DOWNLOAD_RECEIVED_COUNT = Counter.build() + private static final Counter TOTAL_DOWNLOAD_RECEIVED_COUNT = Counter.builder() .name("total_download_received_count") .help("Total number of download received.").register(); - private static final Counter DOWNLOAD_SUCCESS_COUNT = Counter.build() + private static final Counter DOWNLOAD_SUCCESS_COUNT = Counter.builder() .name("download_success_count") .help("Total number of download successfully processed.").register(); - private static final Counter DOWNLOAD_FAILURE_COUNT = Counter.build() + private static final Counter DOWNLOAD_FAILURE_COUNT = Counter.builder() .name("download_failure_count") .help("Total number of download failures.").register(); |