function addInstrumentationHandler(type, callback) {
  switch (type) {
    case 'console':
      return console.addConsoleInstrumentationHandler(callback);
    case 'dom':
      return dom.addClickKeypressInstrumentationHandler(callback);
    case 'xhr':
      return xhr.addXhrInstrumentationHandler(callback);
    case 'fetch':
      return fetch.addFetchInstrumentationHandler(callback);
    case 'history':
      return history.addHistoryInstrumentationHandler(callback);
    case 'error':
      return globalError.addGlobalErrorInstrumentationHandler(callback);
    case 'unhandledrejection':
      return globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler(callback);
    default:
      debugBuild.DEBUG_BUILD && logger.logger.warn('unknown instrumentation type:', type);
  }
}
Add handler that will be called when given type of instrumentation triggers.
Use at your own risk, this might break without changelog notice, only used internally.
@hidden
@deprecated Use the proper function per instrumentation type instead!