Auth0 Logs to Application Insights
The Auth0 Logs to Application Insights is a scheduled job takes all of your Auth0 logs and exports them to Application Insights.
Configure the Extension
The Install Extension window pops open, and you will be asked to set the following configuration variables:
- Schedule: The frequency with which logs should be exported.
- Batch_Size: The amount of logs to be read on each execution. Maximum is 100.
- Start_From: The ID of the log that you want to start sending from
- Slack_Incoming_Webhook_URL: The Slack webhook URL that you want to use to receive notifications regarding your log-sending process
- Slack_Send_Success: If yes, Auth0 will send verbose notifications to Slack
- Log_Level: The log level of events to be sent; Auth0 will send all logs at the selected above and higher
- Log_Types: The types of logs you want send; leave blank to send all log events
- AppInsights_Instrumentation_Key: The Application Insights instrumentation key (see the following section for information on obtaining the instrumentation key if you do not already have it)
When done, click Install to proceed.
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
ELSE case, the last batch will have < 100 logs.
Retrieve the required information from Application Insights
When configuring the extension, you'll be asked by Auth0 to provide the instrumentation key for Application Insights. You will need to have created an Application Insights resource with Azure before you can obtain this value.
Use Your Installed Extension
There, you can see the job you just created, modify its state by toggling the State switch, and see when the next run is due and what was the result of the last execution.
You can view more details by clicking on the job you created. On this page you can view details for each execution, reschedule, access real-time logs, and more.