observability

package
v0.0.3-0...-630480d Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MErrors is representative of all errors, differentiated by the tag of the command e.g:
	//   "write", "read", "drop", "decode", "connection", "find", "distinction"
	MErrors = stats.Int64("mongo/client/errors", "The number of errors encountered", dimensionless)

	// MCalls is representative of all calls, differentiated by the tag of the command e.g:
	//   "write", "read", "drop", "decode", "connection", "find", "distinction"
	MCalls = stats.Int64("mongo/client/calls", "The number of call invocations", dimensionless)

	MBytesWritten = stats.Int64("mongo/client/bytes_written", "The number of bytes written", by)
	MBytesRead    = stats.Int64("mongo/client/bytes_read", "The number of bytes read", by)

	MDeletions  = stats.Int64("mongo/client/deletions", "The number of deletions", dimensionless)
	MInsertions = stats.Int64("mongo/client/insertions", "The number of insertions", dimensionless)
	MReads      = stats.Int64("mongo/client/reads", "The number of reads", dimensionless)
	MUpdates    = stats.Int64("mongo/client/updates", "The number of updates", dimensionless)
	MReplaces   = stats.Int64("mongo/client/replaces", "The number of replaces", dimensionless)
	MWrites     = stats.Int64("mongo/client/writes", "The number of writes", dimensionless)

	MConnectionsNew    = stats.Int64("mongo/client/connections_new", "The number of new connections", dimensionless)
	MConnectionsReused = stats.Int64("mongo/client/connections_reused", "The number of reused connections", dimensionless)
	MConnectionsClosed = stats.Int64("mongo/client/connections_closed", "The number of closed connections", dimensionless)

	MConnectionLatencyMilliseconds = stats.Int64("mongo/client/connection_latency", "The latency to make a connection", ms)
	MRoundTripLatencyMilliseconds  = stats.Float64("mongo/client/roundtrip_latency", "The roundtrip latency of commands in milliseconds", ms)
)
View Source
var AllViews = []*view.View{
	{
		Name:        "mongo/client/bytes_read",
		Description: "The number of bytes read",
		Measure:     MBytesRead,
		Aggregation: defaultByteSizesDistribution,
	},
	{
		Name:        "mongo/client/bytes_read_count",
		Description: "The number of bytes read",
		Measure:     MBytesRead,
		Aggregation: view.Count(),
	},
	{
		Name:        "mongo/client/bytes_written",
		Description: "The number of bytes written",
		Measure:     MBytesWritten,
		Aggregation: defaultByteSizesDistribution,
	},
	{
		Name:        "mongo/client/bytes_written_count",
		Description: "The number of bytes written",
		Measure:     MBytesWritten,
		Aggregation: view.Count(),
	},
	{
		Name:        "mongo/client/reads",
		Description: "The number of reads",
		Measure:     MReads,
		Aggregation: view.Count(),
	},
	{
		Name:        "mongo/client/writes",
		Description: "The number of writes",
		Measure:     MWrites,
		Aggregation: view.Count(),
	},
	{
		Name:        "mongo/client/roundtrip_latency",
		Description: "The distribution of roundtrip latencies",
		Measure:     MRoundTripLatencyMilliseconds,
		Aggregation: defaultLatencyMillisecondsDistribution,
		TagKeys:     []tag.Key{KeyMethod},
	},
	{
		Name:        "mongo/client/connection_latency",
		Description: "The distribution of connection roundtrip latencies",
		Measure:     MConnectionLatencyMilliseconds,
		Aggregation: defaultLatencyMillisecondsDistribution,
	},

	{
		Name:        "mongo/client/connections_new",
		Description: "The number of new connections",
		Measure:     MConnectionsNew,
		Aggregation: view.Count(),
	},
	{
		Name:        "mongo/client/connections_reused",
		Description: "The number of connections reused or taken from a pool",
		Measure:     MConnectionsReused,
		Aggregation: view.Count(),
	},
	{
		Name:        "mongo/client/connections_closed",
		Description: "The number of connections closed",
		Measure:     MConnectionsClosed,
		Aggregation: view.Count(),
	},

	{
		Name:        "mongo/client/errors",
		Description: "The number of errors during different operations",
		Measure:     MErrors,
		Aggregation: view.Count(),
		TagKeys:     []tag.Key{KeyMethod, KeyPart},
	},
	{
		Name:        "mongo/client/calls",
		Description: "The number of calls differentiated by their command names",
		Measure:     MCalls,
		Aggregation: view.Count(),
		TagKeys:     []tag.Key{KeyMethod},
	},
}
View Source
var KeyMethod, _ = tag.NewKey("method")

Tag keys

View Source
var KeyPart, _ = tag.NewKey("part")

Functions

func SinceInMilliseconds

func SinceInMilliseconds(startTime time.Time) float64

Helper functions

Types

This section is empty.

Jump to

Keyboard shortcuts

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