From da498bfc1f006a17f1d8174b10bc33acbd4b2fa0 Mon Sep 17 00:00:00 2001 From: kjaniak Date: Tue, 21 Apr 2020 12:44:53 +0200 Subject: Add of message travel time metric Message travel time: Producer -> HV-VES input introduced. Tests for new metric added. Change-Id: I36347ff53abb3f274e4358af26db49fe8bac95ed Issue-ID: DCAEGEN2-1576 Signed-off-by: kjaniak --- .../main/kotlin/org/onap/dcae/collectors/veshv/boundary/adapters.kt | 1 + .../main/kotlin/org/onap/dcae/collectors/veshv/impl/HvVesCollector.kt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sources/hv-collector-core') diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/boundary/adapters.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/boundary/adapters.kt index 41993e62..3fe5fd5c 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/boundary/adapters.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/boundary/adapters.kt @@ -43,6 +43,7 @@ interface SinkFactory : Closeable { interface Metrics { fun notifyBytesReceived(size: Int) fun notifyMessageReceived(msg: WireFrameMessage) + fun notifyMessageReceived(msg: VesMessage) fun notifyMessageReadyForRouting(msg: VesMessage) fun notifyMessageSent(msg: RoutedMessage) fun notifyMessageDropped(cause: MessageDropCause) diff --git a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/HvVesCollector.kt b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/HvVesCollector.kt index f0d1465b..98b3ce9c 100644 --- a/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/HvVesCollector.kt +++ b/sources/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/HvVesCollector.kt @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * dcaegen2-collectors-veshv * ================================================================================ - * Copyright (C) 2018-2019 NOKIA + * Copyright (C) 2018-2020 NOKIA * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,7 +82,7 @@ internal class HvVesCollector( .filterFailedWithLog(logger, clientContext::fullMdc, { "Ves event header decoded successfully" }, { "Failed to decode ves event header, reason: ${it.message}" }) - } + }.doOnNext(metrics::notifyMessageReceived) private fun filterInvalidProtobufMessages(flux: Flux): Flux = flux .filterFailedWithLog { -- cgit 1.2.3-korg