API Reference PromEx v0.1.6-alpha

Modules

PromEx is a plugin based library which can be used to capture telemetry events and report them out for consumption by Prometheus. The main purpose of this particular library is to provide the behaviour that all PromEx plugins leverage so that a consistent interface can be achieved and so that leveraging multiple plugins is effortless from the user's point of view.

This module provides functions to generate histogram bucket ranges. The lists of buckets that can be generated are either linear or exponential.

This GenServer is responsible for uploading the configured PromEx module dashboards to Grafana. This is a transient process and will terminate after the dashboards have been successfully uploaded. It requires the name of the PromEx module as an option so that it can look into the application config for the appropriate Grafana settings. For example, if the name of the PromEx module is WebApp.PromEx, then your config chould provide the following settings

This is a convenience module used for debugging and introspecting telemetry events. Primarily used to ease for development or PromEx itself.

This module is used by the Mix tasks that are available in PromEx to update dashboards in Grafana and also by the PromEx.DashboardUpdater to update dashboards automatically on application initialization.

This struct encapsulates all of the data necessary to connect to a grafana instance.

This module is used to validate Grafana dashboard to ensure that they adhere to certain style and structure requirements.

This GenServer is responsible to keeping track of all the manual metrics from your configured plugins. It will fetch metrics initially when starting (either immediately or after a configured delay). At that point if you would like to refresh your metrics data points call the refresh_metrics/0 function.

This struct defines the fields necessary to export a group of standard metrics from a plugin.

This struct defines the fields necessary to export a group of manually collected metric sources from a plugin.

This struct defines the fields necessary to export a group of pollable metric sources from a plugin.

Use this plug in your Endpoint file to expose your metrics. The following options are supported by this plug

This module defines the behaviour that PromEx plugins need to implement in order to be properly loaded by PromEx on application start. As a convenience, this module can also be used as a macro to automatically import all of the necessary utility functions for writing plugins and also providing default implementations of behaviour functions that you may not be implementing.

This plugin captures metrics regarding your application, and its dependencies. Specifically, it captures the versions of your application and the application dependencies and also how many modules each dependency is bringing into the project.

Telemetry metrics for the BEAM.

This plugin captures metrics emitted by Phoenix. Specifically, it captures HTTP request metrics and Phoenix channel metrics.

Prometheus Reporter for Telemetry.Metrics definitions.

Mix Tasks

This will generate a PromEx config module in the appropriate place

This will lint Grafana dashboards to ensure that PromEx dashboards meeting certain requirements.

This will publish dashboards to grafana for a PromEx module.