Options
All
  • Public
  • Public/Protected
  • All
Menu

@paychex/collector-azure

Provides an Azure EventHubs collector that can be used with @paychex/core Tracker.

Index

Functions

  • Constructs a collector method that can persist TrackingInfo items to an Azure EventHub in batches. Uses known size and constraint limitations to ensure events reach the hub, and retries if any failures occur.

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

    const tracker = trackers.create(hub);

    // this data will be sent to the EventHub
    tracker.event('label', { optional: 'data' });

    // we send events to the eventHub every 1 second;
    // you can force an immediate send by calling flush:
    hub.flush();

    Parameters

    Returns EventHubSubscriber

    A collector that can be passed to @paychex/core's createTracker method.