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

Breadcrumb

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

function SpanInterface::setAttribute

Adding attributes at span creation is preferred to calling setAttribute later, as samplers can only consider information already present during span creation

Parameters

non-empty-string $key:

bool|int|float|string|array|null $value Note: arrays MUST be homogeneous, i.e. it MUST NOT contain values of different types.:

See also

https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6…

1 method overrides SpanInterface::setAttribute()
NonRecordingSpan::setAttribute in vendor/open-telemetry/api/Trace/NonRecordingSpan.php
@inheritDoc

File

vendor/open-telemetry/api/Trace/SpanInterface.php, line 58

Class

SpanInterface

Namespace

OpenTelemetry\API\Trace

Code

public function setAttribute(string $key, bool|int|float|string|array|null $value) : SpanInterface;

API Navigation

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