MCPcopy
hub / github.com/redis/go-redis / WithEnabled

Method WithEnabled

extra/redisotel-native/config.go:202–205  ·  view source on GitHub ↗

WithEnabled enables or disables metrics emission. Default: false (must explicitly enable)

(enabled bool)

Source from the content-addressed store, hash-verified

200// WithEnabled enables or disables metrics emission.
201// Default: false (must explicitly enable)
202func (c *Config) WithEnabled(enabled bool) *Config {
203 c.Enabled = enabled
204 return c
205}
206
207// WithMeterProvider sets the meter provider to use for creating metrics.
208// If not provided, the global meter provider from otel.GetMeterProvider() will be used.

Callers 3

mainFunction · 0.80
TestMetricsUnderStressFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestMetricsUnderStressFunction · 0.64