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
Namespace
OpenTelemetry\API\TraceCode
public function setAttribute(string $key, bool|int|float|string|array|null $value) : SpanInterface;