Documentation ¶
Overview ¶
Package monitoring is responsible for uploading metrics to a monitoring service that supports OpenCensus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ActionCount is a metric for tracking the number of actions in reproxy. ActionCount = stats.Int64("rbe/action/count", "Number of actions processed by reproxy", stats.UnitDimensionless) // ActionLatency is a metric for tracking the e2e latency of an action in reproxy. ActionLatency = stats.Float64("rbe/action/latency", "Time spent processing an action e2e in reproxy", stats.UnitMilliseconds) // BuildCacheHitRatio is a metric of the ratio of cache hits in a build. BuildCacheHitRatio = stats.Float64("rbe/build/cache_hit_ratio", "Ratio of cache hits in a build", stats.UnitDimensionless) // BuildLatency is a metric for tracking the e2e latency of a build in reproxy. BuildLatency = stats.Float64("rbe/build/latency", "Time spent between reproxy receiving the first and last actions of the build", stats.UnitSeconds) // BuildCount is a metric for tracking the number of builds. BuildCount = stats.Int64("rbe/build/count", "Counter for builds", stats.UnitDimensionless) // BootstrapStartupLatency is a metric for tracing the critical path time of starting reproxy with bootstrap. BootstrapStartupLatency = stats.Int64("rbe/build/bootstrap_startup_latency", "Time spent starting reproxy with bootstrap", stats.UnitMilliseconds) // BootstrapShutdownLatency is a metric for tracing the critical path time of shutting down reproxy with bootstrap. BootstrapShutdownLatency = stats.Int64("rbe/build/bootstrap_shutdown_latency", "Time spent shutting down reproxy with bootstrap", stats.UnitMilliseconds) )
Functions ¶
func CleanLogDir ¶
func CleanLogDir(logDir string)
CleanLogDir removes stray log files which may cause confusion when bootstrap starts
func SetupViews ¶
SetupViews sets up monitoring views. This can only be run once.
Types ¶
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter is a type used to construct a monitored resource.
func NewExporter ¶
func NewExporter(ctx context.Context, project, prefix, namespace string, ts *oauth.TokenSource) (*Exporter, error)
NewExporter returns a new Cloud monitoring metrics exporter.
func (*Exporter) Close ¶
func (e *Exporter) Close()
Close stops the metrics exporter and waits for the exported data to be uploaded.
func (*Exporter) ExportActionMetrics ¶
ExportActionMetrics exports metrics for one log record to opencensus.
func (*Exporter) ExportBuildMetrics ¶
ExportBuildMetrics exports overall build metrics to opencensus.
Click to show internal directories.
Click to hide internal directories.