Add contextual information to your traces
Laminar.setTraceMetadata
inside a span context to add metadata to the trace:observe
function:Laminar.setTraceMetadata()
must be called within an active span context (such as within an observe
function call). If called outside of any span context, it will have no effect.userId=123
or region=us-west
.
userId
key of the metadata:
Metadata | Tags | |
---|---|---|
Scope | Applies to entire trace | Applies to individual spans |
Purpose | General trace context | Specific span classification |
Validation | Any string key-value pairs | Any string |
UI Location | Shown in trace overview | Shown in individual span details |
Common Uses | Environment info, user context | Data categories, tags |