MediaWiki  master
Wikimedia\Stats\Emitters\UDPEmitter Class Reference

Metrics UDP Emitter Implementation. More...

Inheritance diagram for Wikimedia\Stats\Emitters\UDPEmitter:
Collaboration diagram for Wikimedia\Stats\Emitters\UDPEmitter:

Public Member Functions

 __construct (string $prefix, StatsCache $cache, FormatterInterface $formatter, ?string $target)
 
 send ()
 Runs metrics and their samples from the cache through the formatter and sends them along.
Returns
void
More...
 
 withPayloadSize (int $payloadSize)
 Sets payload size for batching. More...
 
 withTransport (UDPTransport $transport)
 Overrides the transport. More...
 

Detailed Description

Metrics UDP Emitter Implementation.

Leverages UDPTransport to emit wire-formatted metrics.

Author
Cole White
Since
1.41

Definition at line 39 of file UDPEmitter.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Stats\Emitters\UDPEmitter::__construct ( string  $prefix,
StatsCache  $cache,
FormatterInterface  $formatter,
?string  $target 
)

Definition at line 56 of file UDPEmitter.php.

References UDPTransport\MAX_PAYLOAD_SIZE, and UDPTransport\newFromString().

Member Function Documentation

◆ send()

Wikimedia\Stats\Emitters\UDPEmitter::send ( )

Runs metrics and their samples from the cache through the formatter and sends them along.

Returns
void

Implements Wikimedia\Stats\Emitters\EmitterInterface.

Definition at line 140 of file UDPEmitter.php.

◆ withPayloadSize()

Wikimedia\Stats\Emitters\UDPEmitter::withPayloadSize ( int  $payloadSize)

Sets payload size for batching.

Parameters
int$payloadSize
Returns
UDPEmitter

Definition at line 70 of file UDPEmitter.php.

◆ withTransport()

Wikimedia\Stats\Emitters\UDPEmitter::withTransport ( UDPTransport  $transport)

Overrides the transport.

Parameters
UDPTransport$transport
Returns
UDPEmitter

Definition at line 81 of file UDPEmitter.php.


The documentation for this class was generated from the following file: