From 03ded02d63b196fed2724b1a541457525c3885bc Mon Sep 17 00:00:00 2001 From: kissand Date: Thu, 2 Mar 2023 13:30:17 +0100 Subject: Add new metrics to the get data node method Issue-ID: CPS-1509 Change-Id: I2eded9a23b56f5263591c710c7a707cf281f93d7 Signed-off-by: kissand --- .../src/main/java/org/onap/cps/api/impl/CpsQueryServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cps-service') diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsQueryServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsQueryServiceImpl.java index 7b9043a608..a63faabac4 100644 --- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsQueryServiceImpl.java +++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsQueryServiceImpl.java @@ -20,6 +20,7 @@ package org.onap.cps.api.impl; +import io.micrometer.core.annotation.Timed; import java.util.Collection; import lombok.RequiredArgsConstructor; import org.onap.cps.api.CpsQueryService; @@ -37,6 +38,8 @@ public class CpsQueryServiceImpl implements CpsQueryService { private final CpsValidator cpsValidator; @Override + @Timed(value = "cps.data.service.datanode.query", + description = "Time taken to query data nodes") public Collection queryDataNodes(final String dataspaceName, final String anchorName, final String cpsPath, final FetchDescendantsOption fetchDescendantsOption) { cpsValidator.validateNameCharacters(dataspaceName, anchorName); -- cgit 1.2.3-korg