asSpanContext

Casts this Context as a SpanContext and retrieves its aws.sdk.kotlin.services.bedrockagentcore.model.SpanContext value. Throws an exception if the Context is not a SpanContext.