observability

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MBytesRead                     = stats.Int64("redis/bytes_read", "The number of bytes read from the server", stats.UnitBytes)
	MBytesWritten                  = stats.Int64("redis/bytes_written", "The number of bytes written out to the server", stats.UnitBytes)
	MDialErrors                    = stats.Int64("redis/dial_errors", "The number of dial errors", dimensionless)
	MConnectionsTaken              = stats.Int64("redis/connections_taken", "The number of connections taken", dimensionless)
	MConnectionsClosed             = stats.Int64("redis/connections_closed", "The number of connections closed", dimensionless)
	MConnectionsReturned           = stats.Int64("redis/connections_returned", "The number of connections returned to the pool", dimensionless)
	MConnectionsReused             = stats.Int64("redis/connections_reused", "The number of connections reused", dimensionless)
	MConnectionsNew                = stats.Int64("redis/connections_new", "The number of newly created connections", dimensionless)
	MConnectionUseTimeMilliseconds = stats.Float64("redis/connection_usetime", "The number of milliseconds for which a connection is used", unitMilliseconds)
	MRoundtripLatencyMilliseconds  = stats.Float64("redis/roundtrip_latency", "The time between sending the first byte to the server until the last byte of response is received back", unitMilliseconds)
	MWriteErrors                   = stats.Int64("redis/write_errors", "The number of errors encountered during write routines", dimensionless)
	MWrites                        = stats.Int64("redis/writes", "The number of write invocations", dimensionless)
)
View Source
var KeyCommandName, _ = tag.NewKey("cmd")
View Source
var Views = []*view.View{
	{
		Name:        "redis/client/connection_usetime",
		Description: "The duration in milliseconds for which a connection is used before being returned to the pool, closed or discarded",

		Aggregation: defaultMillisecondsDistribution,
		Measure:     MConnectionUseTimeMilliseconds,
	},
	{
		Name:        "redis/client/dial_errors",
		Description: "The number of errors encountered after dialling",
		Aggregation: view.Count(),
		Measure:     MDialErrors,
	},
	{
		Name:        "redis/client/bytes_written_cummulative",
		Description: "The number of bytes written out to the server",
		Aggregation: view.Count(),
		Measure:     MBytesWritten,
	},
	{
		Name:        "redis/client/bytes_written_distribution",
		Description: "The number of distribution of bytes written out to the server",
		Aggregation: defaultBytesDistribution,
		Measure:     MBytesWritten,
	},
	{
		Name:        "redis/client/bytes_read_cummulative",
		Description: "The number of bytes read from a response from the server",
		Aggregation: view.Count(),
		Measure:     MBytesRead,
	},
	{
		Name:        "redis/client/bytes_read_distribution",
		Description: "The number of distribution of bytes read from the server",
		Aggregation: defaultBytesDistribution,
		Measure:     MBytesRead,
	},
	{
		Name:        "redis/client/roundtrip_latency",
		Description: "The distribution of milliseconds of the roundtrip latencies",
		Aggregation: defaultMillisecondsDistribution,
		Measure:     MRoundtripLatencyMilliseconds,
		TagKeys:     []tag.Key{KeyCommandName},
	},
	{
		Name:        "redis/client/write_errors",
		Description: "The number of errors encountered during a write routine",
		Aggregation: view.Count(),
		Measure:     MWriteErrors,
		TagKeys:     []tag.Key{KeyCommandName},
	},
	{
		Name:        "redis/client/writes",
		Description: "The number of write invocations",
		Aggregation: view.Count(),
		Measure:     MWrites,
		TagKeys:     []tag.Key{KeyCommandName},
	},
	{
		Name:        "redis/client/connections_taken",
		Description: "The number of connections taken out the pool",
		Aggregation: view.Count(),
		Measure:     MConnectionsTaken,
	},
	{
		Name:        "redis/client/connections_returned",
		Description: "The number of connections returned the connection pool",
		Aggregation: view.Count(),
		Measure:     MConnectionsReturned,
	},
	{
		Name:        "redis/client/connections_reused",
		Description: "The number of connections reused",
		Aggregation: view.Count(),
		Measure:     MConnectionsReused,
	},
	{
		Name:        "redis/client/connections_new",
		Description: "The number of newly created connections",
		Aggregation: view.Count(),
		Measure:     MConnectionsNew,
	},
}

Functions

func TagKeyValuesIntoContext

func TagKeyValuesIntoContext(ctx context.Context, key tag.Key, values ...string) (context.Context, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL