Documentation ¶
Index ¶
- func InitMetrics() error
- func RecordBytesReceived(ctx context.Context, num int64, instance, dialerID string)
- func RecordBytesSent(ctx context.Context, num int64, instance, dialerID string)
- func RecordDialError(ctx context.Context, instance, dialerID string, err error)
- func RecordDialLatency(ctx context.Context, instance, dialerID string, latency int64)
- func RecordOpenConnections(ctx context.Context, num int64, dialerID, instance string)
- func RecordRefreshResult(ctx context.Context, instance, dialerID string, err error)
- type Attribute
- type EndSpanFunc
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 RecordBytesReceived ¶ added in v1.13.0
RecordBytesReceived reports the number of bytes received from an AlloyDB instance.
func RecordBytesSent ¶ added in v1.13.0
RecordBytesSent reports the number of bytes sent to an AlloyDB instance.
func RecordDialError ¶
RecordDialError reports a failed dial attempt. If err is nil, RecordDialError is a no-op.
func RecordDialLatency ¶
RecordDialLatency records a latency value for a call to dial.
func RecordOpenConnections ¶
RecordOpenConnections records the number of open connections
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 AlloyDB instance name.
type EndSpanFunc ¶
type EndSpanFunc func(error)
EndSpanFunc is a function that ends a span, reporting an error if necessary.