{"id":18418626,"url":"https://github.com/bsm/instruments","last_synced_at":"2025-04-13T05:54:54.296Z","repository":{"id":5852455,"uuid":"52504329","full_name":"bsm/instruments","owner":"bsm","description":"Collecting metrics over discrete time intervals","archived":false,"fork":false,"pushed_at":"2022-06-06T10:00:59.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T05:54:51.810Z","etag":null,"topics":["go","golang","histogram","instrumentation"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/bsm/instruments","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"heroku/instruments","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-25T07:07:20.000Z","updated_at":"2022-06-06T10:00:37.000Z","dependencies_parsed_at":"2022-07-24T20:32:23.732Z","dependency_job_id":null,"html_url":"https://github.com/bsm/instruments","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Finstruments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Finstruments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Finstruments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Finstruments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsm","download_url":"https://codeload.github.com/bsm/instruments/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670502,"owners_count":21142901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","histogram","instrumentation"],"created_at":"2024-11-06T04:14:10.548Z","updated_at":"2025-04-13T05:54:54.267Z","avatar_url":"https://github.com/bsm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instruments\n\n[![Build Status](https://travis-ci.org/bsm/instruments.svg)](https://travis-ci.org/bsm/instruments) [![GoDoc](https://godoc.org/github.com/bsm/instruments?status.svg)](https://godoc.org/github.com/bsm/instruments)\n\nInstruments allows you to collects metrics over discrete time intervals.\nThis a fork of the (original library)[https://github.com/heroku/instruments] which\ncomes with several new additions - consider it a v2!\n\nCollected metrics will only reflect observations from last time window only,\nrather than including observations from prior windows, contrary to EWMA based metrics.\n\nThe new features include:\n\n* Slighly faster\n* More convenient API\n* Support for tags\n* Built-in reporters\n* Accurate histograms\n\n## Instruments\n\nInstruments support two types of instruments: Discrete instruments return a single value, and Sample instruments a sorted array of values.\n\nThese base instruments are available:\n\n- Counter: a simple counter.\n- Rate: tracks the rate of values per seconds.\n- Reservoir: randomly samples values.\n- Derive: tracks the rate of values based on the delta with previous value.\n- Gauge: tracks last value.\n- Timer: tracks durations.\n\nYou can create custom instruments or compose new instruments form the built-in instruments as long as they implements the Sample or Discrete interfaces.\n\n## Documentation\n\nPlease see the [API documentation](https://godoc.org/github.com/bsm/instruments) for package and API descriptions and examples.\n\n## See also\n\n* [Instrumentation by Composition](https://engineering.heroku.com/blogs/2014-10-23-instrumentation-by-composition)\n* [Go Metrics](https://github.com/rcrowley/go-metrics)\n* [Interval metrics](https://github.com/aphyr/interval-metrics)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Finstruments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsm%2Finstruments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Finstruments/lists"}