trace.context

Apply a context patch to a call. Use an IIFE for a smaller scope:

Reference version

Signature

function trace.context(
metadata: map<string, string | int | float | bool | null> = …,
distinct_id: string | null = …
) -> trace.Options throws never

Apply a context patch to a call. Use an IIFE for a smaller scope:

(() -> {
    log.info("Processing payment")
})($trace = trace.context(metadata = { "phase": "payment" }))

Source:<builtin>/trace/trace.bamlbytes 5016–5183