diff options
author | sourabh_sourabh <sourabh.sourabh@est.tech> | 2024-06-20 17:48:47 +0100 |
---|---|---|
committer | sourabh_sourabh <sourabh.sourabh@est.tech> | 2024-07-03 16:52:49 +0100 |
commit | d6f0977a25cf0896227ae6cc5abd7866af80e237 (patch) | |
tree | ece0f193d5fcefdb18b34da406ef8b252485c369 /cps-ncmp-rest/src | |
parent | 37e328eeaa3e79416e70f348da79cff3ad2e547b (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/src')
-rw-r--r-- | cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandler.java | 3 |
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); } |