@stephen-shopopop/node-metrics
    Preparing search index...

    Mediates the collection of metrics by managing a set of plugins.

    The MetricsMediator class implements the Capture interface and allows for the registration of multiple metric plugins. When the capture method is called, it delegates the capture operation to all registered plugins.

    const mediator = new MetricsMediator();
    mediator.add(new SomePlugin());
    mediator.capture(context);

    Implements

    • Capture
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    plugins: Map<string, Plugin<MetricsValues>> = ...

    Methods

    • Invokes the capture method on all registered plugins, passing the provided context.

      Parameters

      • context: MetricsContext

        The context object containing relevant data to be captured by each plugin.

      Returns void