Documentation
Overview ¶
Package metrics provides common metrics code for Lucifer.
Monitoring configuration is global to the program. This package sets up Stackdriver Trace, BigQuery, and tsmon.
The GOOGLE_APPLICATION_CREDENTIALS environment variable specifies the GCP service account credentials for metrics.
A top level trace is set up with the program name, taken from the first command argument.
Index ¶
Constants ¶
Variables ¶
var ( // StartCounter is a tsmon counter for lucifer start events. StartCounter = metric.NewCounter( "chromeos/lucifer/run_job/start", "lucifer start events", nil) )
Functions ¶
Types ¶
type BQClient ¶
type BQClient struct {
// contains filtered or unexported fields
}
A BQClient emits BigQuery events.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents all of the monitoring component clients. The client should be closed after use.
func Setup ¶
Setup configures monitoring based on the given Config. Make sure to close the client after use. Errors in setting up monitoring components will be logged and ignored so the caller does not need to worry about stopping the entire program (better to have no metrics and think there is an outage than to actually have an outage).