package
0.0.0-20240117062805-2b7dcb4a7edf
Repository: https://github.com/remind101/pkg.git
Documentation: pkg.go.dev

# README

Description

Reports custom metrics to DataDog.

Packages

Usage

metrics.SetEmpireDefaultTags() // sets empire.app.name, empire.app.process, empire.app.release and
                               // container_id tags on every metric.

metrics.Reporter, _ = NewDataDogMetricsReporter("statsd:2026")
defer metrics.Close()
...
metrics.Count("mycount", 1, map[string]string{"feature_version":"v1"}, 1.0)

See metrics.go for more examples.

# Packages

No description provided by the author
No description provided by the author

# Functions

Close closes the backend connection cleanly.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Samples and reports current runtime status once.
ResponseTime is a shorthand for reporting web response time.
Runtime enters into a loop, sampling and outputing the runtime stats periodically.
No description provided by the author
SetEmpireDefaultTags sets default tags reflecting the empire environment to each metric.
Time is a shorthand for TimeInMilliseconds for easy code block instrumentation Usage: t := metrics.Time("foo.bar", map[string]string{"baz":"qux"}, 1.0) defer t.Done() ..
No description provided by the author

# Variables

Usage: metrics.SetEmpireDefaultTags() metrics.Reporter, _ = NewDataDogMetricsReporter("statsd:2026") defer metrics.Close() ..
sets how often the metrics Runtime will sample and emit stats.

# Structs

No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author