zio / zio-metrics-legacy

⛔️ DEPRECATED
https://zio.github.io/zio-metrics
Apache License 2.0
56 stars 39 forks source link

Removing ref from Registry.Service Impl #111

Closed ChallenHB closed 2 years ago

ChallenHB commented 2 years ago

This started as my attempt to fix #108. I originally was just going to update the Ref[CollectionRegistry] to a RefM. But, after looking at the code, I don't think that a Ref makes sense for this use case. My understanding is that Refs are intended to be used with immutable objects. The CollectorRegistry is mutable, and the default registry is a global static variable anyways. Given that, I think it's best just to wrap all the calls to the registry in an effect and leave it at that.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.