aura-http-monkey-patcher utility

aura-http-monkey-patcher utility is in charge of HTTP monkey patching

Introduction

aura-http-monkey-patcher utility is designed as a common place to do activities in HTTP monkey patching.

It is placed in the Github repository:
aura-bot-libraries/packages/aura-http-monkey-patcher/.

Use of aura-http-monkey-patcher utility

When loading the modules in the app orchestrator (or any other method), the methods startMetricsTimer and kpiApiRequest could be overriden. (both are optional).

        // Initiate the App.
        await appOrchestrator.init();
        // Sets required methods in HttpMonkeyPatcher
        HttpMonkeyPatcher.instance.startMetricsTimer = startPrometheusTimer;
        HttpMonkeyPatcher.instance.kpiApiRequest = KpiHandler.instance.apiRequest.bind(KpiHandler.instance);