Documentation ¶
Index ¶
Constants ¶
View Source
const ( MetricNamespace = "klaytn" DashboardEnabledFlag = "dashboard" PrometheusExporterFlag = "prometheus" PrometheusExporterPortFlag = "prometheusport" )
View Source
const MetricsEnabledFlag = "metrics"
MetricsEnabledFlag is the CLI flag name to use to enable metrics collections.
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.