Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ImmutableSpan.php

class ImmutableSpan

@psalm-immutable

Hierarchy

  • class \OpenTelemetry\SDK\Trace\ImmutableSpan implements \OpenTelemetry\SDK\Trace\SpanDataInterface

Expanded class hierarchy of ImmutableSpan

File

vendor/open-telemetry/sdk/Trace/ImmutableSpan.php, line 16

Namespace

OpenTelemetry\SDK\Trace
View source
final class ImmutableSpan implements SpanDataInterface {
    
    /**
     * @param non-empty-string $name
     * @param list<LinkInterface> $links
     * @param list<EventInterface> $events
     */
    public function __construct(Span $span, string $name, array $links, array $events, AttributesInterface $attributes, int $totalRecordedLinks, int $totalRecordedEvents, StatusDataInterface $status, int $endEpochNanos, bool $hasEnded) {
    }
    public function getKind() : int {
        return $this->span
            ->getKind();
    }
    public function getContext() : API\SpanContextInterface {
        return $this->span
            ->getContext();
    }
    public function getParentContext() : API\SpanContextInterface {
        return $this->span
            ->getParentContext();
    }
    public function getTraceId() : string {
        return $this->getContext()
            ->getTraceId();
    }
    public function getSpanId() : string {
        return $this->getContext()
            ->getSpanId();
    }
    public function getParentSpanId() : string {
        return $this->getParentContext()
            ->getSpanId();
    }
    public function getStartEpochNanos() : int {
        return $this->span
            ->getStartEpochNanos();
    }
    public function getEndEpochNanos() : int {
        return $this->endEpochNanos;
    }
    public function getInstrumentationScope() : InstrumentationScopeInterface {
        return $this->span
            ->getInstrumentationScope();
    }
    public function getResource() : ResourceInfo {
        return $this->span
            ->getResource();
    }
    public function getName() : string {
        return $this->name;
    }
    
    /** @inheritDoc */
    public function getLinks() : array {
        return $this->links;
    }
    
    /** @inheritDoc */
    public function getEvents() : array {
        return $this->events;
    }
    public function getAttributes() : AttributesInterface {
        return $this->attributes;
    }
    public function getTotalDroppedEvents() : int {
        return max(0, $this->totalRecordedEvents - count($this->events));
    }
    public function getTotalDroppedLinks() : int {
        return max(0, $this->totalRecordedLinks - count($this->links));
    }
    public function getStatus() : StatusDataInterface {
        return $this->status;
    }
    public function hasEnded() : bool {
        return $this->hasEnded;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ImmutableSpan::getAttributes public function Overrides SpanDataInterface::getAttributes
ImmutableSpan::getContext public function Overrides SpanDataInterface::getContext
ImmutableSpan::getEndEpochNanos public function Overrides SpanDataInterface::getEndEpochNanos
ImmutableSpan::getEvents public function @inheritDoc Overrides SpanDataInterface::getEvents
ImmutableSpan::getInstrumentationScope public function Overrides SpanDataInterface::getInstrumentationScope
ImmutableSpan::getKind public function Overrides SpanDataInterface::getKind
ImmutableSpan::getLinks public function @inheritDoc Overrides SpanDataInterface::getLinks
ImmutableSpan::getName public function Overrides SpanDataInterface::getName
ImmutableSpan::getParentContext public function Overrides SpanDataInterface::getParentContext
ImmutableSpan::getParentSpanId public function Overrides SpanDataInterface::getParentSpanId
ImmutableSpan::getResource public function Overrides SpanDataInterface::getResource
ImmutableSpan::getSpanId public function Overrides SpanDataInterface::getSpanId
ImmutableSpan::getStartEpochNanos public function Overrides SpanDataInterface::getStartEpochNanos
ImmutableSpan::getStatus public function Overrides SpanDataInterface::getStatus
ImmutableSpan::getTotalDroppedEvents public function @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk_exporters/non-otlp.md#dropped-events-count Overrides SpanDataInterface::getTotalDroppedEvents
ImmutableSpan::getTotalDroppedLinks public function @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.1/specification/trace/sdk_exporters/non-otlp.md#dropped-links-count Overrides SpanDataInterface::getTotalDroppedLinks
ImmutableSpan::getTraceId public function Overrides SpanDataInterface::getTraceId
ImmutableSpan::hasEnded public function Overrides SpanDataInterface::hasEnded
ImmutableSpan::__construct public function
RSS feed
Powered by Drupal