function Span::wrap
@inheritDoc
Overrides SpanInterface::wrap
2 calls to Span::wrap()
- NoopSpanBuilder::startSpan in vendor/
open-telemetry/ api/ Trace/ NoopSpanBuilder.php - Starts and returns a new { The user _MUST_ manually end the span by calling { This method does _NOT_ automatically install the span into the current context. The user is responsible for calling {
- TraceContextPropagator::extract in vendor/
open-telemetry/ api/ Trace/ Propagation/ TraceContextPropagator.php - Extracts specific values from the provided carrier into the provided {via an {
File
-
vendor/
open-telemetry/ api/ Trace/ Span.php, line 39
Class
Namespace
OpenTelemetry\API\TraceCode
public static final function wrap(SpanContextInterface $spanContext) : SpanInterface {
if (!$spanContext->isValid()) {
return self::getInvalid();
}
return new NonRecordingSpan($spanContext);
}