diff options
author | 2020-04-21 12:44:53 +0200 | |
---|---|---|
committer | 2020-04-22 11:19:54 +0000 | |
commit | da498bfc1f006a17f1d8174b10bc33acbd4b2fa0 (patch) | |
tree | 3711f4b175ce046feceaab482a9d786a2f152a55 /sources/hv-collector-core/src/main | |
parent | c61dcc75290d24ec0f0188b32e0ab0a7f15ea420 (diff) |
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 <kornel.janiak@nokia.com>
Diffstat (limited to 'sources/hv-collector-core/src/main')
2 files changed, 3 insertions, 2 deletions
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<VesMessage>): Flux<VesMessage> = flux .filterFailedWithLog { |