aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--reception/pom.xml8
-rw-r--r--reception/src/main/java/org/onap/policy/distribution/reception/statistics/DistributionStatisticsManager.java15
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();