Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
func Install(options *Options)
Install registers the metrics under the given namespace and subsystem. This take effect only once; subsequent calls has no effect.
func RecordRPCRequest ¶
RecordRPCRequest gathers the metric values of a RPC HTTP request. It should be called at the end of a request session.
Types ¶
type Options ¶
type Options struct { NamespaceLabel string `desc:"label name for the metrics namespace"` NamespaceValue string `desc:"metrics namespace; also used as the value of the namespace label (if provided)"` SubsystemLabel string `desc:"label name for the metrics subsystem"` SubsystemValue string `desc:"metrics subsystem; also used as the value of the subsystem value (if provided)"` }
Options provide a way to configure the name of the metrics (by setting Namespace and Subsystem) and control if and how these value should be used as label values. If you are unsure about these options, just use nil or empty Options.
func DefaultOptions ¶
func DefaultOptions() *Options
DefaultOptions builds an Options object with default values; it is used automatically when a nil Options is provided.
Click to show internal directories.
Click to hide internal directories.