Semantic Conventions where * applicable. * * @param array $attributes key-value mapping of attribute names to values * @return SpanInterface fluent interface */ public function setAttributes( array $attributes ): SpanInterface; /** * Set the kind of this span, which describes how it relates to its parent and children * within the overarching trace. * * @param int $spanKind One of the SpanInterface::SPAN_KIND_** constants * @see https://opentelemetry.io/docs/specs/otel/trace/api/#spankind * @return SpanInterface fluent interface */ public function setSpanKind( int $spanKind ): SpanInterface; /** * Start this span, optionally specifying an override for its start time. * @param int|null $epochNanos The start time to use, or `null` to use the current time. * @return SpanInterface */ public function start( ?int $epochNanos = null ): SpanInterface; /** * End this span, optionally specifying an override for its end time. * @param int|null $epochNanos The end time to use, or `null` to use the current time. * @return void */ public function end( ?int $epochNanos = null ): void; /** * Make this span the active span. * * This will cause any spans started without specifying an explicit parent to automatically * become children of this span as long as it remains active. * * @return void */ public function activate(): void; /** * Deactivate this span. * @return void */ public function deactivate(): void; }