How to Insert Datadog Trace IDs or Other Custom Info into Auth0 Logs
Last Updated:
Overview
This article explains whether it is possible to pass a trace ID into Auth0 requests and customize Auth0's log output to include the trace.
Applies To
- Datadog
- Auth0 Logs
Solution
To add additional parameters to requests, use /authorize method, webAuth.authorize(), which is then retrievable in the event.request.query object in Login Actions, Actions Triggers: post-login - Event Object.
However, adding custom data to streams/logs is not currently supported. One workaround if working with Datadog is to pass logs directly to Datadog from Rules/Actions (for example, using HTTP requests or an npm library like datadog-metrics).