Documentation
¶
Overview ¶
Package metrics provides functions to emit ts_mon and bq metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecordBatchSize ¶
RecordBatchSize records a metric about the number of requests handled within a batch.
func RecordProtoSize ¶
RecordProtoSize records a metric about a given proto's size.
func RecordStateGaugeMetrics ¶
RecordStateGaugeMetrics records general gauge metrics about the given state.
As new metrics are added, gauge metrics about a state should be emitted here. Because none of the metrics emitted herein are cumulative, it doesn't matter if this is called within a datastore transaction or not, or whether the transaction that called it succeeds.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer implements scheduler.EventSink.
Metrics are buffered so that they can be sent to bigquery and tsmon upon successful datastore transaction.
func (*Buffer) FlushToBQ ¶
FlushToBQ flushes events to bigquery.
This can be called inside of a datastore transaction, in which case events will only be flushed if the transaction succeeds.
func (*Buffer) FlushToTsMon ¶
FlushToTsMon flushes events to ts_mon.