Skip to content

Provides an Azure Event Bus collector for use with a @paychex/core Tracker.

License

Notifications You must be signed in to change notification settings

paychex/collector-azure

Repository files navigation

@paychex/collector-azure

Provides an Azure Event Bus collector for use with a @paychex/core Tracker.

Installation

npm install @paychex/collector-azure

Importing

esm

import { eventHub } from '@paychex/collector-azure';

cjs

const { eventHub } = require('@paychex/collector-azure');

amd

define(['@paychex/collector-azure'], function(collectors) { ... });
define(['@paychex/collector-azure'], function({ eventHub }) { ... });
require(['@paychex/collector-azure'], function(collectors) { ... });
require(['@paychex/collector-azure'], function({ eventHub }) { ... });

iife (browser)

const { eventHub } = window['@paychex/collector-azure'];

Usage

Construct a new Azure Event Hub collector for use in the @paychex/core Tracker by passing a configuration object with the following keys:

key type description
name string required The name of the Event Hub to connect to.
connection string required The full connection string of the Event Hub to connect to.
formatter Function optional Function to use to format the TrackingInfo instance into an Azure Event Hub entry.
import { trackers } from '@paychex/core';
import { eventHub } from '@paychex/collector-azure';

const hub = eventHub({
  name: process.env.HUB_NAME,
  connection: process.env.HUB_CONNECTION
});

const tracker = trackers.create(hub);

About

Provides an Azure Event Bus collector for use with a @paychex/core Tracker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published