Ecosyste.ms: Packages

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

Top 8.3% on proxy.golang.org

proxy.golang.org : github.com/pennocktech/hmetrics

Package hmetrics is an opinionated, simple to plumb, implementation of Heroku's Go language metrics, which plays nicely with logs. Heroku's implementation is simpler if you don't want to log or to have sane capped exponential backoff. This package is simpler to use if you do. The callback you pass must be present and has no return value; this is different from Heroku's implementation. We deliberately support neither nil logging callbacks nor callbacks being able to cancel metrics collection via their return code. We make a number of checks before spawning the go-routine which does metrics posts and return any errors resulting from those, so the only errors once spawned and exposed to the callback afterwards will be context cancellation (your action), problems collecting stats (should be transient) or HTTP errors posting to the endpoint, which presumably will recover at some point. There's no documented guidance on HTTP errors which indicate "service has had to move, abort and restart to collect the new URL", so any analysis you might do in a callback is a guessing game of little utility. Just call Spawn() with your error-logging callback and handle the return values from Spawn as you see fit.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/pennocktech/hmetrics
Keywords: go, golang, golang-library, heroku, metrics, metrics-exporter
License: MIT
Latest release: over 2 years ago
First release: about 6 years ago
Namespace: github.com/pennocktech
Stars: 2 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 17 days ago

    Loading...
    Readme
    Loading...