Metrics plugins¶
- class apf.metrics.GenericMetricsProducer(config)[source]¶
Methods
send_metrics
(metrics)Write metrics into a data store or other metrics system.
- class apf.metrics.LogfileMetricsProducer(config)[source]¶
Write metrics into a logfile
- Parameters:
- configdict
Allowed parameters:
“PATH”: path to logfile, if not set a tempfile will be created in /tmp.
Methods
send_metrics
(metrics)Write metrics to logfile.
- class apf.metrics.KafkaMetricsProducer(config, producer=None)[source]¶
Write metrics in a Kafka Topic.
Useful for high-throughput distributed metrics, a complex architecture can be build using Apache Kafka as a queue and writing the metrics inside a time series data store, for example Prometheus, InfluxDB or Elasticsearch.
- Parameters:
- configdict.
Parameters passed to the producer.
PARAMS: Parameters passed to
apf.producer.KafkaProducer
.TOPIC: List of topics to produce, for example [‘metrics’].
- producerapf.producers.GenericProducer
An apf producer, by default is
apf.producer.KafkaProducer
.
Methods
send_metrics
(metrics)