metrics

package
v0.19.821 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(v *validator.Validate, opts ...writerOption) (*writer, error)

New returns a workflow writer, which uses the underlying metrics writer to emit metrics

func WithMetricsWriter

func WithMetricsWriter(mw metrics.Writer) writerOption

func WithTags

func WithTags(tags map[string]string) writerOption

Types

type Writer

type Writer interface {
	// dogstatsd metrics
	Incr(workflow.Context, string, ...string)
	Decr(workflow.Context, string, ...string)
	Gauge(workflow.Context, string, float64, ...string)
	Timing(workflow.Context, string, time.Duration, ...string)

	// datadog specific
	Event(workflow.Context, *statsd.Event)

	Flush(workflow.Context)
}

Jump to

Keyboard shortcuts

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