You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for the question. It has sparked some discussion among the team. We will update documentation on this.
MeterBinder instances generally aren't expected to have bindTo called often. Typically it would be expected that it is called on MeterRegistry instances at configuration time for an application. However, I think even our own MeterBinder implementations may not be consistent on whether the implementation is done in such a way that the same MeterBinder instance can be bound to multiple registries without issue. So I think that's a question/expectation to decide on before answering about thread safety. By thread safe, do you mean when bindTo is called concurrently for the same MeterBinder instance? Do you have a use case in which you expect this to happen with some MeterBinder, or is it just a general question about implementation concerns?
It's more about implementation concerns - I've seen bindTo methods in some libraries that use synchronized keywords or ReentrantLock and micrometer implementations that do not use such mechanisms.
Should I make my MeterBinder implementations thread-safe? Docs do not specify that...
The text was updated successfully, but these errors were encountered: