AbstractMetricDecorator

abstract class AbstractMetricDecorator<T : Any>(val delegate: T) : Decorator<T>

Abstract base class for metric decorators that provides common functionality for tagging reactive streams with source information. This class implements the Decorator pattern to wrap components and add metrics collection capabilities.

Parameters

T

the type of the delegate component being decorated

Inheritors

Constructors

Link copied to clipboard
constructor(delegate: T)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
override val delegate: T

the original component being decorated, must implement the Decorator interface

Link copied to clipboard

The source identifier derived from the original delegate's class name. This is used for metrics tagging to identify the component type.

Functions

Link copied to clipboard
fun <M> Flux<M>.tagSource(): Flux<M>

Extension function to tag a Flux publisher with the current source identifier. This adds the source tag to metrics collected from this reactive stream.

fun <M> Mono<M>.tagSource(): Mono<M>

Extension function to tag a Mono publisher with the current source identifier. This adds the source tag to metrics collected from this reactive stream.