1.0.6 • Published 1 year ago

@pouch/extension-logs v1.0.6

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Extension logs and monitoring service

Based on DataDog and required Megatron clientHash as session ID.

Documentation: https://docs.datadoghq.com/logs/error_tracking/browser_and_mobile?tab=browser

Automatically log console errors and unhandled errors on HTML pages after initialisation.

Usage

Install package:

  • npm install @pouch/extension-logs --save-dev

Import log service and init in project:

import { ExtensionLogsService } from '@pouch/extension-logs';

const logsService = new ExtensionLogsService();

logsService.init({
  clientToken: '{DataDog client token}',
  env: 'local', // 'local' | 'production' | 'staging'
  origin: 'background', // 'background' | 'content' | 'popup' | 'page'
  service: '{brand}:extension',
  sessionId: '{Megatron clientHash}',
  version: chrome.runtime.getManifest().version,
});

const data: any = {'x': 'y'}; // additional log data 
logsService.debug('debug message', data);
1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago