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

Breadcrumb

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

function LocalRootSpan::fromContext

Retrieve the local root span from a Context. @experimental

1 call to LocalRootSpan::fromContext()
LocalRootSpan::current in vendor/open-telemetry/api/Trace/LocalRootSpan.php
Retrieve the local root span. This is the root-most active span which has a remote or invalid parent. If there is no active local root span, then an invalid span is returned. @experimental

File

vendor/open-telemetry/api/Trace/LocalRootSpan.php, line 31

Class

LocalRootSpan
@experimental

Namespace

OpenTelemetry\API\Trace

Code

public static function fromContext(ContextInterface $context) : SpanInterface {
    return $context->get(self::key()) ?? Span::getInvalid();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal