Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommandMonitor ¶
func NewCommandMonitor(opts ...Option) *event.CommandMonitor
NewCommandMonitor creates a event.CommandMonitor that exports metrics of Mongo commands. It also registers Prometheus collectors.
The following metrics are exported:
- Histogram of command duration. - Counter of command errors.
Types ¶
type Option ¶
type Option func(*Options)
func WithDurationBuckets ¶
WithDurationBuckets sets the duration buckets of commands.
func WithInstanceName ¶
WithInstanceName sets the name of the MongoDB instance.
func WithNamespace ¶
WithNamespace sets the namespace of all metrics.
Click to show internal directories.
Click to hide internal directories.