- TypeScript
- Python
Laminar.setSpanAttributes(attributes)
Set attributes on the current span.| Name | Type | Description |
|---|---|---|
attributes | Record<typeof LaminarAttributes[keyof typeof LaminarAttributes], AttributeValue> | Key-value pairs |
voidLaminar.setSpanOutput(output)
Explicitly set span output.| Name | Type | Default | Description |
|---|---|---|---|
output | any | — | Output payload (JSON-serialized) |
voidNote: No-op if output is null or undefined.Laminar.setSpanTags(tags)
Set tags on the current span (deduplicated).| Name | Type | Default | Description |
|---|---|---|---|
tags | string[] | — | Tags to set (deduplicated) |
voidNote: Laminar.addSpanTags(...) is not available in the TypeScript SDK—use setSpanTags(...).Laminar.event(options)
Add an event to the current span, or create a span if none exists.| Name | Type | Default | Description |
|---|---|---|---|
options.name | string | — | Event name (required) |
options.attributes | Record<string, AttributeValue> | — | Event attributes |
options.timestamp | TimeInput | OTEL now | Custom timestamp |
options.sessionId | string | — | Session ID |
options.userId | string | — | User ID |
voidspan.end(endTime?)
End a manually created span.| Name | Type | Default | Description |
|---|---|---|---|
endTime | TimeInput | OTEL now | End timestamp |
voidNote: Pops active context if span was activated via startActiveSpan.span.recordException(exception, time?)
Record an exception on the span.| Name | Type | Default | Description |
|---|---|---|---|
exception | Exception | — | Error/exception to record |
time | TimeInput | OTEL now | Timestamp |
voidspan.setAttributes(attributes)
Set attributes directly on a span object.| Name | Type | Description |
|---|---|---|
attributes | SpanAttributes | Key-value pairs |
this