Closed wvanbergen closed 5 years ago
This is definitely not ready, but some early feedback would be welcome!
Should we use sorbet for type checking? I think we can even have the sorbet rbi file get generated from the documentation to provide that type checking. We should be able to use the sorbet runtime during testing and not use it for production (using sorbet stubs to ignore any inline annotations in the application).
So this is working pretty well, and has helped me find many issues in our StatsD usage.
What is still missing is s strict monkeypatch for the metaprgramming methods. I rather add that in a separate PR, so we can review and merge this one.
Adds a
Strict
monkeypatch that strictly validates the arguments provided to StatsD methods for correct usage. You can enable this in CI of a project by addingrequire 'statsd/instrument/strict'
, to fin deprecated behavior that may no longer work in the future.