It is known to have weird API, race conditions and contentious locks.
Goals in particular:
* Get rid of New*In(...) functions (e.g. NewIntIn). No one uses them, they are confusing.
* Get rid of New*Callback and New*CallbackIn functions (e.g. NewCallbackInt). Almost no one uses them, there's no type checks, and nothing bad happens if non-callback metrics are used from within callbacks (in fact most callback users do just that).
* Get rid of "global callbacks" (but keep "regular" callbacks). They are needed only on GAE and can be implemented in GAE-specific portion of tsmon. Their usage is subtle and confusing (I saw them used outside GAE, where regular callbacks metrics should be used instead).
* Cleanup usage of context.Context. GetState(context.Background()) should fail, instead of silently falling back to global variables, like it does now. This is just weird.
* Stop returning 'error' from metric setters. There can be no errors there, and no one actually checks them anyway.
* Make custom targets easier to use, they are useful on appengine.
* Stop using metric-global locks, e.g. one hot combination of metric fields must not block updates to other combinations of fields.
* Distribution-valued metrics are racy.
Comment 1 by bugdroid1@chromium.org
, Feb 1 2018