function Span::startSpan
This method _MUST_ not be used directly. End users should use a {
@psalm-param API\SpanKind::KIND_* $kind
@internal @psalm-internal OpenTelemetry
Parameters
non-empty-string $name:
list<LinkInterface> $links:
See also
API\TracerInterface} in order to create spans.
1 call to Span::startSpan()
- SpanBuilder::startSpan in vendor/
open-telemetry/ sdk/ Trace/ SpanBuilder.php - @inheritDoc
File
-
vendor/
open-telemetry/ sdk/ Trace/ Span.php, line 62
Class
Namespace
OpenTelemetry\SDK\TraceCode
public static function startSpan(string $name, API\SpanContextInterface $context, InstrumentationScopeInterface $instrumentationScope, int $kind, API\SpanInterface $parentSpan, ContextInterface $parentContext, SpanLimits $spanLimits, SpanProcessorInterface $spanProcessor, ResourceInfo $resource, AttributesBuilderInterface $attributesBuilder, array $links, int $totalRecordedLinks, int $startEpochNanos) : self {
$span = new self($name, $context, $instrumentationScope, $kind, $parentSpan->getContext(), $spanLimits, $spanProcessor, $resource, $attributesBuilder, $links, $totalRecordedLinks, $startEpochNanos !== 0 ? $startEpochNanos : Clock::getDefault()->now());
// Call onStart here to ensure the span is fully initialized.
$spanProcessor->onStart($span, $parentContext);
return $span;
}