Function addCounter

  • Wraps a function and creates a metric that counts how many times it was called

    Parameters

    • fn: CallableFunction

      Any callable function

    • counterConfiguration: CounterConfiguration<string>

    Returns (...args: unknown[]) => Promise<any>