Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
Event describes a single "event" produced by rotating the Client's cached storage. These events aren't single events from the perspective of the driver, but rather a window of events.
type Monitor ¶
type Monitor interface { DriverAPM() *event.CommandMonitor Rotate() Event }
Monitor provides a high level command monitoring total.
func NewBasicMonitor ¶
func NewBasicMonitor(config *MonitorConfig) Monitor
NewBasicMonitor returns a simple monitor implementation that does not automatically rotate data. The MonitorConfig makes it possible to filter events. If this value is nil, no events will be filtered.
type MonitorConfig ¶
type MonitorConfig struct { // PopulateEvents, when true, forces the collector to // preallocate the output structures, for all filtered // combinations of databases, collections, and commands as // well as namespaces and commands. This is primarily useful // when the output requires a predetermined schema or // structure and you want to maintain the shape of the data // even if no events for a particular command or namespace // occurred. // // When pre-populating events, you should specify commands to // filter and either a list of collections and databases or a // list of namespaces. PopulateEvents bool // Commands, Databases, and Collections give you the ability // to whitelist a number of operations to filter and exclude // other non-matching operations. Commands []string Databases []string Collections []string // Tags are added to operations via contexts and permit // more granular annotations. You must specify a tag in Tags // to tracked counters. If AllTags is set, all tags are // tracked and reported. Tags []string AllTags bool // Namespaces allow you to declare a specific database and // collection name as a pair. When specified, only events that // match the namespace will be collected. Namespace filtering // occurs after the other filtering, including by command. Namespaces []Namespace }
MonitorConfig makes it possible to configure the behavior of the Monitor. In most cases you can pass a nil value.
Click to show internal directories.
Click to hide internal directories.