Documentation
¶
Overview ¶
Package trace provides an interface for tracing internal operations and reporting various metrics. Metrics are recorded on a package-global basis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitMetrics ¶
func InitMetrics() error
InitMetrics registers all views once. Without registering views, metrics will not be reported. If any names of the registered views conflict, this function returns an error to indicate an internal configuration problem.
func RecordDialLatency ¶
RecordDialLatency records a latency value for a call to dial.
Types ¶
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
Attribute annotates a span with additional data.
func AddDialerID ¶
AddDialerID creates an attribute to identify a particular dialer.
func AddInstanceName ¶
AddInstanceName creates an attribute with the Cloud SQL instance name.
type EndSpanFunc ¶
type EndSpanFunc func(error)
EndSpanFunc is a function that ends a span, reporting an error if necessary.