{"repo":"evolution-gaming/smetrics","free":true,"listed":false,"github":"https://github.com/evolution-gaming/smetrics","clone":"git clone https://github.com/evolution-gaming/smetrics.git","description":"Generic interface to abstract from metrics vendors and their implementations","language":"Scala","stars":12,"topics":["scala","prometheus","cats","cats-effect"],"license":"MIT","category":"analytics","readme_excerpt":"SMetrics Features: tagless final api via cats improved abstraction for matching labels names and label values resource safety detaching metrics backend - prometheus dependency is one of the backend implementations Example of http metrics let's declare interface for metrics, that seems reasonable for http client now let's implement HttpMetrics using CollectorRegistry So you can see, httpMetrics function requires instance of CollectorRegistry . Right now there are two options available: CollectorRegistry.empty - often used in tests CollectorRegistryPrometheus - which will create smetrics.CollectorRegistry out of io.prometheus.CollectorRegistry using prometheus/client java under the hood Return type is Resource[F, ] rather than F[ ] because most often underlying metrics implementation upon a call registers your metrics with shared registry. Hence release hook of Resource being used in order to de-register particular metrics from shared registry. Thread pool metrics smetrics-threads module gauges the number of live JVM threads per thread pool as dispatcher threads{poolName} . The JVM does not expose which pool a thread belongs to, so threads are attributed to pools by their name. Naming schemes are application specific, hence the matcher is yours to provide. Threads the matcher does not recognise are not reported: Threads are re-sampled every MeterThreads.DefaultInterval . To change the prefix, the interval, or the set of sampled threads, pass your own Metrics and thread source i","default_branch":null,"files":null,"tree":[],"storefront":"/r/evolution-gaming","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/evolution-gaming/smetrics/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}