Prerequisites
- An Azure Event Hubs namespace and event hub.
- An Azure Function App with the Node.js runtime.
- An ingest key and the project ID, saved as the app settings
SQUASHER_API_KEYandSQUASHER_PROJECT_ID. See Create an ingest key.
Set up the drain
1
Stream the logs to Event Hubs
- In the Azure portal, open the resource and select Diagnostic settings under Monitoring.
- Select Add diagnostic setting.
- Choose the log categories, choose your event hub as the destination, and save.
2
Deploy the forwarder function
Azure sends each batch as an object with a Set
records array. The function turns each record
into one JSON line with the fields that Squasher reads.src/functions/squasher-forwarder.ts
EVENT_HUB_CONNECTION to the event hub connection string, and eventHubName to your
event hub.What Squasher keeps from each record
The function decides what Squasher receives. See the
drain record format for every field
that Squasher reads.
Verify
- Cause one error in the Azure resource, or wait for a diagnostic log.
- In the function’s logs, check that each run ends without an error.
- In Squasher, select Logs in the sidebar. The lines appear with the category as the service. Error lines also appear in Issues.
Limits
- Azure levels such as
Informationalare stored as info. - Drain records have no environment, so automatic AI triage does not run on their issues.
- If Squasher answers
429or503, the function throws. Add a retry policy to the function so that it sends the batch again.
Next steps
Drain record format
See how Squasher reads every drain record.
OpenTelemetry
Send traces and errors from your Azure apps.