package
0.0.0-20240716132614-1643519e6f91
Repository: https://github.com/triggermail/luci-go.git
Documentation: pkg.go.dev
# Packages
Package distribution contains distribution metrics, fixed width and geometric bucketers.
Package runtimestats exposes metrics related to the Go runtime.
No description provided by the author
# Functions
Flush sends all the metrics that are registered in the application.
GetState returns the State instance held in the context (if set) or else returns the global state.
Initialize configures the tsmon library with the given monitor and store.
InitializeFromFlags configures the tsmon library from flag values.
Monitor returns the global monitor that sends metrics to monitoring endpoints.
NewFlags returns a Flags struct with sensible default values.
NewState returns a new default State, configured with a nil Store and Monitor.
RegisterCallback registers a callback function that will be run at metric collection time to set the values of one or more metrics.
RegisterCallbackIn is like RegisterCallback but registers in a given context.
RegisterGlobalCallback registers a callback function that will be run once per minute on *one* instance of your application.
RegisterGlobalCallbackIn is like RegisterGlobalCallback but registers in a given context.
ResetCumulativeMetrics resets only cumulative metrics.
SetStore changes the global metric store.
Shutdown gracefully terminates the tsmon by doing the final flush and disabling auto flush (if it was enabled).
Store returns the global metric store that contains all the metric values for this process.
WithDummyInMemory returns a new context holding a new State with a new in- memory store and a fake monitor.
WithFakes returns a new context holding a new State with a fake store and a fake monitor.
WithState returns a new context holding the given State instance.
# Constants
FlushAuto automatically flushes at a periodic flush interval.
FlushManual requires the user to flush manually.
# Structs
Flags defines command line flags related to tsmon.
A GlobalCallback is a Callback with the list of metrics it affects, so those metrics can be reset after they are flushed.
State holds the configuration of the tsmon library.