Documentation ¶
Index ¶
- Constants
- type Observer
- type Option
- func WithAbandonedCounter(enabled bool) Option
- func WithCanceledCounter(enabled bool) Option
- func WithConstLabels(labels prometheus.Labels) Option
- func WithDequeuedCounter(enabled bool) Option
- func WithNamespace(namespace string) Option
- func WithPendingCounter(enabled bool) Option
- func WithPendingGauge(enabled bool) Option
- func WithQueuedCounter(enabled bool) Option
- func WithQueuedGauge(enabled bool) Option
- func WithRejectedCounter(enabled bool) Option
- func WithReportedCounter(enabled bool) Option
- type Policy
Constants ¶
const ( MaxConcurrentPolicy = Policy("MaxConcurrent") TokenBucketPolicy = Policy("TokenBucket") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
An Option provides optional configuration for an Observer.
func WithAbandonedCounter ¶ added in v0.4.0
WithAbandonedCounter returns an Option that sets if the rejected counter is enabled. It is enabled by default.
func WithCanceledCounter ¶
WithCanceledCounter returns an Option that sets if the canceled counter is enabled. It is enabled by default.
func WithConstLabels ¶ added in v0.6.0
func WithConstLabels(labels prometheus.Labels) Option
WithConstLabels returns an Option that adds constant labels to all metrics.
func WithDequeuedCounter ¶
WithDequeuedCounter returns an Option that sets if the dequeued counter is enabled. It is enabled by default.
func WithNamespace ¶ added in v0.6.0
WithNamespace returns an Option that sets the namespace for all metrics. The default is empty.
func WithPendingCounter ¶
WithPendingCounter returns an Option that sets if the pending counter is enabled. It is enabled by default.
func WithPendingGauge ¶
WithPendingGauge returns an Option that sets if the pending gauge is enabled. It is enabled by default.
func WithQueuedCounter ¶
WithQueuedCounter returns an Option that sets if the queued counter is enabled. It is enabled by default.
func WithQueuedGauge ¶
WithQueuedGauge returns an Option that sets if the queued gauge is enabled. It is enabled by default.
func WithRejectedCounter ¶
WithRejectedCounter returns an Option that sets if the rejected counter is enabled. It is enabled by default.
func WithReportedCounter ¶ added in v0.3.0
WithReportedCounter returns an Option that sets if the reported counter is enabled. It is enabled by default.