An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

proxy.golang.org : github.com/bradenaw/metrics

package metrics wraps github.com/DataDog/datadog-go/v5/statsd with a more ergonomic and computationally cheaper interface. This is done by separating tags from logging metrics so that for frequently-logged gauges and counters logging is just a single atomic operation. For each metric type of Gauge, Count, Distribution, and Set, there are a set of NewMDefY methods where M is the metric type and Y is the number of tags. Calls to NewMDefY must be done at init-time (ideally in a top-level var block) of a metrics.go file with names as full literals so that metrics are easily greppable. Metrics not defined this way will cause the process to panic if still at init-time, meaning before any code in main() has run, otherwise will produce non-functional stats and produce to a gauge stat called metrics.bad_metric_definitions. It's a good idea to put an alert on this stat so that if it starts logging during a deploy, you know your other metrics may not be trustworthy. See the example folder for an example of usage. Generally you will have:

Registry - Source - Documentation - JSON - codemeta.json
purl: pkg:golang/github.com/bradenaw/metrics
License: MIT
Latest release: about 2 years ago
First release: over 2 years ago
Namespace: github.com/bradenaw
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 5 months ago