Commit Graph

7 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan 45df3dce92 FIX: Ensure socket is closed when error is raised while opening socket 2024-12-05 10:57:10 +08:00
Alan Guo Xiang Tan cf7bf84226
DEV: Introduce syntax_tree for formatting (#329) 2024-12-05 08:42:33 +08:00
Sam Saffron cbe1d51e2a
Minor test refactoring 2021-11-23 11:14:20 +11:00
Sam Saffron ac2084b074
correct and simplify noisy test 2021-08-04 15:58:46 +10:00
Anuj Biyani c3e26a827b
FEATURE: swap from hardcoded STDERR to logger (#177)
logger still defaults to STDERR, so there's no change unless a user passes in their own logger

* add documentation
* add unit test for custom logger
2021-07-22 10:48:30 +10:00
jasquat 4a91bba4fc allow passing opts to Histogram and Summary from client. w/ burnettk (#46)
* allow passing opts to Histogram and Summary from client. w/ burnettk

* default opts to nil and let collector create the hash when needed and added client tests for it. w/ burnettk
2019-10-30 17:11:45 +11:00
Hector Zhao a70657f2a6 Feature: allow finding registered metric by metric name, type, or help (#86)
When reusing the same client in different places to export the same
metric, there is no external interface to retrieve this metric after
it's registered. Using `instance_variable_get` to reach into the
instance variable `@metrics` is less preferable. Re-registering the
metric will lead to an ever-growing array of `@metrics`.

This commit provides a way to get the metric by name, and optionally by
type and help, so that we can use the registered metric(s) to observe
2019-09-09 15:38:09 +10:00