Page MenuHomeWickedGov Phorge

NoopSpan.php
No OneTemporary

Size
949 B
Referenced Files
None
Subscribers
None

NoopSpan.php

<?php
namespace Wikimedia\Telemetry;
/**
* An unsampled span that does nothing and persists no data.
*
* @since 1.43
* @internal
*/
class NoopSpan implements SpanInterface {
private SpanContext $context;
public function __construct( SpanContext $context ) {
$this->context = $context;
}
/** @inheritDoc */
public function getContext(): SpanContext {
return $this->context;
}
/** @inheritDoc */
public function setAttributes( array $attributes ): SpanInterface {
return $this;
}
/** @inheritDoc */
public function setSpanKind( int $spanKind ): SpanInterface {
return $this;
}
/** @inheritDoc */
public function start( ?int $epochNanos = null ): SpanInterface {
return $this;
}
/** @inheritDoc */
public function end( ?int $epochNanos = null ): void {
// no-op
}
/** @inheritDoc */
public function activate(): void {
// no-op
}
/** @inheritDoc */
public function deactivate(): void {
// no-op
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, May 16, 17:12 (10 h, 13 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2c/b9/943503b4c5c24629b2322de62ebb
Default Alt Text
NoopSpan.php (949 B)

Event Timeline