Disposes the scope and finalizes telemetry data collection.
Legacy dispose method for compatibility.
Gets the span context for this scope.
Records multiple attribute key/value pairs.
Records a cancellation event on the span.
Optionalreason: stringRecords an error that occurred during the operation.
Records the finish reasons.
Records the input messages for telemetry tracking.
Records the number of input tokens.
Records the output messages for telemetry tracking.
Records the number of output tokens.
Sets a custom end time for the scope.
When set, dispose() will pass this value to span.end() instead of using wall-clock time.
ProtectedsetSets a tag on the span if the value is not null or undefined.
StaticstartCreates and starts a new scope for inference tracing.
Request payload (channel, conversationId, content, sessionId).
The inference call details (model, provider, tokens, etc.).
The agent performing the inference. tenantId is required.
OptionaluserDetails: UserDetailsOptional human caller identity.
OptionalspanDetails: A365SpanDetailsOptional span configuration. spanKind is always CLIENT.
Provides OpenTelemetry tracing scope for generative AI inference operations.