# SpanContext

`import { SpanContext } from "destack:telemetry";`

Trace identity for one active span.

```ds title="SpanContext"
export struct SpanContext {
    traceId: TraceId;
    spanId: SpanId;
    parentSpanId: SpanId | undefined;
}
```

[language/library/src/telemetry/record.ds:64:73](https://github.com/destack-sh/destack/blob/main/language/library/src/telemetry/record.ds#L64-L73)

## Members

### `traceId: TraceId`

Trace containing this span.

### `spanId: SpanId`

Span identifier.

### `parentSpanId: SpanId | undefined`

Parent span identifier when present.
