Docs

Auth0 Logs to Segment

Auth0 Logs to Segment

The Auth0 Logs to Segment is a scheduled job that takes all of your Auth0 logs and exports them to Segment.

Configure the Extension

To install and configure this extension, click on the Auth0 Logs to Segment box in the list of provided extensions on the Extensions page of the dashboard. The Install Extension window pops open.

At this point you should set the following configuration variables:

Parameter Description
Schedule The frequency with which logs should be exported. The schedule can be customized even further after creation.
BATCH_SIZE The amount of logs to be read on each execution. Maximun, and default, is 100.
START_FROM The checkpoint ID of the log from where you want to start.
SLACK_INCOMING_WEBHOOK The Slack incoming webhook URL used to send relevant updates.
SLACK_SEND_SUCCESS Toggle for sending verbose notifications to Slack.
SEGMENT_KEY Your segment key.

Once you have provided this information, click the Install button to finish installing the extension.

Batch size

When setting your BATCH_SIZE, please keep the following information in mind.

During each time frame/window (defined by your chosen Schedule), outstanding logs will be batched into groups and sent. The size of each group is determined by the BATCH_SIZE value.

In other words, during each window, NUM_BATCHES batches of logs will be sent based on the following logic:

IF (NUM_LOGS modulo 100 == 0):
  NUM_BATCHES = (NUM_LOGS / BATCH_SIZE)
ELSE:
  NUM_BATCHES = (NUM_LOGS / BATCH_SIZE) + 1

In the ELSE case, the last batch will have < 100 logs.

Use the Extension

You can monitor activity by logging into the extension. There you can find reports on most recent runs. Reports contains amount of logs processed and errors, if any.

Replay Logs

In the event of a Segment failure or service interruption you can replay the logs starting from the failed log.

To replay logs:

  1. Get the checkpoint ID of the failed log.
  2. Go to the Auth0 Logs to Segment extension settings.
  3. Enter the checkpoint in the START_FROM field.
  4. Click the Save button to replay the failed logs.

Slack Integration

To set up Slack integration, provide an Incoming Webhook URL to the SLACK_INCOMING_WEBHOOK field in the Auth0 Logs to Segment extension settings.

The extension sends failed transaction notifications to Slack with the checkpoint code displayed in the message. You can also enable verbose notifications by turning on the SLACK_SEND_SUCCESS setting.

Slack Message