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

Breadcrumb

  1. Drupal Core 11.1.x

WithSpan.php

Namespace

OpenTelemetry\API\Instrumentation

File

vendor/open-telemetry/api/Instrumentation/WithSpan.php

View source
<?php

declare (strict_types=1);
namespace OpenTelemetry\API\Instrumentation;

use Attribute;
use OpenTelemetry\API\Trace\SpanKind;

//@phan-suppress-current-line PhanUnreferencedUseNormal

/**
 * Functions and methods with this attribute will be auto-instrumented
 * by the OpenTelemetry extension.
 */
final class WithSpan {
    
    /**
     * @param string|null $span_name Optional span name. Default: function name or class::method
     * @param int|null $span_kind Optional {@link SpanKind}. Default: {@link SpanKind::KIND_INTERNAL}
     * @param array $attributes Optional attributes to be added to the span.
     */
    public function __construct(?string $span_name = null, ?int $span_kind = null, array $attributes = []) {
    }

}

Classes

Title Deprecated Summary
WithSpan Functions and methods with this attribute will be auto-instrumented by the OpenTelemetry extension.
RSS feed
Powered by Drupal