Documentation ¶
Index ¶
Constants ¶
View Source
const DashboardEnabledFlag = "dashboard"
View Source
const MetricsEnabledFlag = "metrics"
MetricsEnabledFlag is the CLI flag name to use to enable metrics collections.
View Source
const PrometheusExporterFlag = "prometheus"
View Source
const PrometheusExporterPortFlag = "prometheusport"
Variables ¶
View Source
var Enabled = false
Enabled is checked by the constructor functions for all of the standard metrics. If it is true, the metric returned is a stub.
This global kill-switch helps quantify the observer effect and makes for less cluttered pprof profiles.
View Source
var EnabledPrometheusExport = false
Functions ¶
func CollectProcessMetrics ¶
CollectProcessMetrics periodically collects various metrics about the running process.
func ReadDiskStats ¶
ReadDiskStats retrieves the disk IO stats belonging to the current process.
func StartMetricCollectionAndExport ¶
func StartMetricCollectionAndExport(ctx *cli.Context)
StartMetricCollectionAndExport starts exporting to prometheus and collects process metrics.
Types ¶
Click to show internal directories.
Click to hide internal directories.