MemoryMetricExporter implements MetricExporter
FinalYes
Exporter that stores metrics in memory for direct access.
Useful for testing and inspection where you need direct access to exported data without serialization.
Interfaces
- MetricExporter
- Interface for exporting metrics to external systems.
Methods
- export() : bool
- Export a batch of metrics.
- metrics() : array<string|int, Metric>
- Get all exported metrics.
- reset() : void
- Reset all stored data.
- transports() : array<string|int, Transport>
- Get the transports used by this exporter.
Methods
export()
Export a batch of metrics.
public
export(array<string|int, Metric> $metrics) : bool
Parameters
- $metrics : array<string|int, Metric>
Return values
bool —True on success, false on failure
metrics()
Get all exported metrics.
public
metrics() : array<string|int, Metric>
Return values
array<string|int, Metric>reset()
Reset all stored data.
public
reset() : void
transports()
Get the transports used by this exporter.
public
transports() : array<string|int, Transport>