summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest
diff options
context:
space:
mode:
authorsourabh_sourabh <sourabh.sourabh@est.tech>2024-06-20 17:48:47 +0100
committersourabh_sourabh <sourabh.sourabh@est.tech>2024-07-03 16:52:49 +0100
commitd6f0977a25cf0896227ae6cc5abd7866af80e237 (patch)
treeece0f193d5fcefdb18b34da406ef8b252485c369 /cps-ncmp-rest
parent37e328eeaa3e79416e70f348da79cff3ad2e547b (diff)
CPS NCMP: Resolved high cardinality of prometheus metrics for dmi service url
- Used autoconfigured web client builder for http_client_requests_* prometheus metrics. - Refactored dmi service url builder to create url template and its variables. - Web client is modified to use uri(urlTemplate, urlvars) version. - Deleted InvalidDmiResourceUrlException that no longer needed. - Used DmiServiceUrlBuilder to build dmi health check service url. - Created a new pkg url.builder into utils to have all related classes and record. Issue-ID: CPS-2121 Change-Id: Id67e0f0d4e640bb8f9eea0b6c2db1dba3468e1d7 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Diffstat (limited to 'cps-ncmp-rest')
-rw-r--r--cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java
index d8bc73a3a5..d8c4af53bb 100644
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java
@@ -28,7 +28,6 @@ import org.onap.cps.ncmp.api.data.exceptions.InvalidOperationException;
import org.onap.cps.ncmp.api.data.exceptions.OperationNotSupportedException;
import org.onap.cps.ncmp.api.impl.exception.DmiClientRequestException;
import org.onap.cps.ncmp.api.impl.exception.DmiRequestException;
-import org.onap.cps.ncmp.api.impl.exception.InvalidDmiResourceUrlException;
import org.onap.cps.ncmp.api.impl.exception.NcmpException;
import org.onap.cps.ncmp.api.impl.exception.ServerNcmpException;
import org.onap.cps.ncmp.exceptions.InvalidTopicException;
@@ -80,7 +79,7 @@ public class NetworkCmProxyRestExceptionHandler {
@ExceptionHandler({DmiRequestException.class, DataValidationException.class, InvalidOperationException.class,
OperationNotSupportedException.class, HttpMessageNotReadableException.class, InvalidTopicException.class,
- InvalidDatastoreException.class, InvalidDmiResourceUrlException.class})
+ InvalidDatastoreException.class})
public static ResponseEntity<Object> handleDmiRequestExceptions(final Exception exception) {
return buildErrorResponse(HttpStatus.BAD_REQUEST, exception);
}