noop

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider is a no-op metrics provider that discards all metrics. Use this when metrics collection is disabled.

func NewProvider

func NewProvider() *Provider

NewProvider creates a new no-op metrics provider

func (*Provider) RecordCount

func (p *Provider) RecordCount(metricName string, count uint64)

RecordCount is a no-op

func (*Provider) RecordDuration

func (p *Provider) RecordDuration(metricName string, duration time.Duration)

RecordDuration is a no-op

func (*Provider) RecordEvent

func (p *Provider) RecordEvent(eventName string, attributes map[string]interface{})

RecordEvent is a no-op

func (*Provider) StartTrace

func (p *Provider) StartTrace(name string) metrics.Trace

StartTrace returns a no-op trace

type Span

type Span struct{}

Span is a no-op span

func (*Span) AddAttribute

func (s *Span) AddAttribute(key string, value interface{})

AddAttribute is a no-op

func (*Span) End

func (s *Span) End()

End is a no-op

type Trace

type Trace struct{}

Trace is a no-op trace

func (*Trace) AddAttribute

func (t *Trace) AddAttribute(key string, value interface{})

AddAttribute is a no-op

func (*Trace) End

func (t *Trace) End()

End is a no-op

func (*Trace) OnError

func (t *Trace) OnError(err error)

OnError is a no-op

func (*Trace) SetRequest

func (t *Trace) SetRequest(r metrics.Request)

SetRequest is a no-op

func (*Trace) SetResponse

func (t *Trace) SetResponse(w http.ResponseWriter) http.ResponseWriter

SetResponse returns the writer unchanged

func (*Trace) StartSpan

func (t *Trace) StartSpan(name string) metrics.Span

StartSpan returns a no-op span

Jump to

Keyboard shortcuts

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