MediaWiki master
Wikimedia\Stats\Emitters\UDPEmitter Class Reference

Metrics UDP Emitter Implementation. More...

Inherits Wikimedia\Stats\Emitters\EmitterInterface.

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

 
 withPayloadSize (int $payloadSize)
 Sets payload size for batching.
 
 withTransport (UDPTransport $transport)
 Overrides the transport.
 

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.

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 139 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: