monitor() Operator

This monitor() operator is part of the fis-commons library.

It is used for monitoring performance of your rxjs observables in your console.

Install fis-commons into your project by running the folling command
npm install https://cdn.swopt.com/npm/fis-commons

Usage
Include this import statement in your class file.
import { monitor } from "fis-commons/observable/operators";
   
Applying the monitor operator onto your observables:
your_observable.pipe(monitor()).subscribe()
   
the code above produces the following output in your console:
Status:
  • started - observable started
  • updated - subscriber.next() fired
  • completed - subscriber.complete() fired
  • error - observable has error
You can also specify the name, config, and request as parameters of the monitor:
i.e. passing in request message object and a callback function
      your_observable.pipe(monitor('my-observable',{callback(monitorData) => {
      //console.log(monitorData.message);
      //console.log(monitorData.request);
      //console.log(monitorData.response);
      // your_subject.next(monitorData);
      //your code here
      }}[OPTIONAL],JSON.parse(request_message_json_string)[OPTIONAL])).subscribe();
  

1.0.3

[monitor] added option to append monitor data to response of source observable [monitor] added request and response objects in callback