Diagnostics.CorrelationId
ExpressionReturns an opaque identifier to correlate incoming requests with outgoing ones.
Syntax
Diagnostics.CorrelationId() as nullable textReturn Value
text — A text identifier used to correlate incoming and outgoing requests, or null if unavailable.
Remarks
Diagnostics.CorrelationId returns an opaque text identifier that can be used to correlate incoming requests with outgoing ones. This is useful in distributed tracing scenarios where the Power Query engine communicates with external services and you need to track a request chain end-to-end.
This is an internal/advanced function primarily relevant in:
- Custom connector development where correlation IDs must be passed to downstream APIs for distributed tracing.
- Diagnostic logging to connect Power Query's evaluation context with external service logs.
The function takes no parameters. It returns null if no correlation ID is available in the current context.
Like Diagnostics.ActivityId, the returned value is opaque — do not parse or depend on its format.
Examples
Example 1: Retrieve the correlation ID
let
CorrelationId = Diagnostics.CorrelationId()
in
#table({"CorrelationId"}, {{CorrelationId}})Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks