Demonstrating Micronaut 3.1.3 conflict between caches in application.yml and MicronautCaffeineCacheMetrics.monitor

Overview

This application illustrates an issue with using a caches section in application.yml in conjunction with MicronautCaffeineCacheMetrics.monitor.

The code is setup to error on startup.

Comment out lines 11-14 in application.yml and restart the application will show it working, but then there are no stats for the caches in prometheus endpoint.

This code was functioning in 2.5.x, but not 3.1.3.

The stacktrace is reported is:

Caused by: java.lang.IllegalArgumentException: Collector already registered that provides name: cache_eviction_weight
	at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:54)
	at io.prometheus.client.Collector.register(Collector.java:175)
	at io.micrometer.prometheus.PrometheusMeterRegistry.lambda$applyToCollector$16(PrometheusMeterRegistry.java:479)

when trying to perform MicronautCaffeineCacheMetrics.monitor in the init block of OtherService.

The caches section causes the same name to be registered for the delivery-service cache entry.

You might also like...
Bego Chat is chat application in Kotlin and Firebase with the following features: last seen , user status like typing ,online and last seen with MVVM pattern and clean architecture

Compose ChatApp(Bego Chat) Bego Chat is Compose chat application in Kotlin and Firebase with the following features: sending all file types and abilit

ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture.
ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture.

ATH Sample ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture. Overview ATH Sample is a sa

Unsplash application for Android, Desktop and Web. Built using Kotlin Multiplatform and Compose
Unsplash application for Android, Desktop and Web. Built using Kotlin Multiplatform and Compose

Unsplash Unsplash application for Android, Desktop and Web. Built using Kotlin Multiplatform and Compose with โค๏ธ ๐Ÿ‘‰ Presentation Set up the environmen

A simple e-market application that allows users to view the store details and products, add products to the basket, and place an order.
A simple e-market application that allows users to view the store details and products, add products to the basket, and place an order.

E-Market Application Features : Store details & products screen Fetch the store detail from an endpoint and display this upper part of the screen. Fet

Stateful is a Kotlin library which makes Android application development faster and easier.

Stateful Stateful is a Kotlin library which makes Android application development faster and easier. It helps you delete all the boilerplate code for

Android application showcasing the MVVM architecture, Clean code using Kotlin, Coroutine, Flow and databinding.
Android application showcasing the MVVM architecture, Clean code using Kotlin, Coroutine, Flow and databinding.

Code4Lyst Android application showcasing the MVVM architecture, Clean code using Kotlin, Coroutine, Flow and databinding. App Architecture MVVM CleanC

This program will read from your android application string.xml file and generate translated strings.xml files in your preferred languages using google sheet.
This program will read from your android application string.xml file and generate translated strings.xml files in your preferred languages using google sheet.

Localize your application content This program will read from your application string.xml file and generate translated strings.xml files in your prefe

An application I am following in a Udemy course to get experience developing an e-commerce using PayPal and Mercado Libre Pago
An application I am following in a Udemy course to get experience developing an e-commerce using PayPal and Mercado Libre Pago

๐Ÿช E-Commerce ๐Ÿ—‚ Table of Contents General Infomation Technologies Used Features

Simple android application that consumes Rick and Morty API to display characters,episodes,Location
Simple android application that consumes Rick and Morty API to display characters,episodes,Location

Rick and Morty Compose An android app built using Kotlin that consumes Rick and

Owner
Mark Fisher
Mark Fisher
A basic application demonstrating IPFS for collaborative data analysis, from the perspective of a Data Analysis Provider.

Spacebox A basic application demonstrating IPFS for collaborative data analysis, from the perspective of a Data Analysis Provider. Description This pr

null 0 Jan 15, 2022
Sample Project with Clean Architecture for demonstrating using Kotlin Flows for fetching User Location and networking.

Nearby-Places-Foursquare-Android Getting Nearby Places using Foursquare API API's Used from FourSquare Get Key from Foursquare site. NearBy places Her

Abhishek Dubey 5 Nov 30, 2022
A sample project demonstrating clean architecture in an Android app

Android Clean Architecture Sample A sample project demonstrating clean architecture in an Android app Tech stack Kotlin Coroutines Flow Jetpack App St

null 22 Jan 5, 2023
An application for converting between units

currency-converter This is an Android Based Application for helping users convert between currencies. The project is part of our Android Jam Series La

MMU CIT CLUB 2 Nov 5, 2021
Link-converter - A web service that converts links between web url and deeplink for mobile and web applications

Deep Link Converter Linkleri, mobil ve web uygulamalarฤฑ iรงin web url ile deeplin

Muhammed Eren DURSUN 2 Apr 9, 2022
A simple project that describes the relationship between the view and it's viewmodel in android development

View-ViewModel-Communication A simple project that describes the relationship between the view and it's viewmodel in android development In MVVM archi

Segun Francis 1 Nov 6, 2021
ShapeShift๏ธ - A Kotlin library for intelligent object mapping and conversion between objects

ShapeShift๏ธ A Kotlin library for intelligent object mapping and conversion between objects. Documentation Installation Maven Gradle Groovy DSL Kotlin

KRUD 127 Dec 7, 2022
Real life Kotlin Multiplatform project with an iOS application developed in Swift with SwiftUI, an Android application developed in Kotlin with Jetpack Compose and a backed in Kotlin hosted on AppEngine.

Conferences4Hall Real life Kotlin Multiplatform project with an iOS application developed in Swift with SwiftUI, an Android application developed in K

Gรฉrard Paligot 98 Dec 15, 2022
Create an application with Kotlin/JVM and Kotlin/JS, and explore features around code sharing, serialization, server- and client

Practical Kotlin Multiplatform on the Web ๋ณธ ์ €์žฅ์†Œ๋Š” ์ฝ”ํ‹€๋ฆฐ ๋ฉ€ํ‹ฐํ”Œ๋žซํผ ๊ธฐ๋ฐ˜ ์›น ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์›Œํฌ์ˆ(๊ฐ•์ขŒ)์„ ์œ„ํ•ด ์ž‘์„ฑ๋œ ํ…œํ”Œ๋ฆฟ ํ”„๋กœ์ ํŠธ๊ฐ€ ์žˆ๋Š” ๊ณณ์ž…๋‹ˆ๋‹ค. ์›Œํฌ์ˆ ๊ณผ์ •์—์„œ ์ฝ”ํ‹€๋ฆฐ ๋ฉ€ํ‹ฐํ”Œ๋žซํผ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ํ”„๋ก ํŠธ์—”๋“œ(front-end)๋Š” Ko

SpringRunner 14 Nov 5, 2022
Create an application with Kotlin/JVM and Kotlin/JS, and explore features around code sharing, serialization, server- and client

Building a Full Stack Web App with Kotlin Multiplatform ๋ณธ ์ €์žฅ์†Œ๋Š” INFCON 2022์—์„œ ์ฝ”ํ‹€๋ฆฐ ๋ฉ€ํ‹ฐํ”Œ๋žซํผ ๊ธฐ๋ฐ˜ ์›น ํ”„๋กœ๊ทธ๋ž˜๋ฐ ํ•ธ์ฆˆ์˜จ๋žฉ์„ ์œ„ํ•ด ์ž‘์„ฑ๋œ ํ…œํ”Œ๋ฆฟ ํ”„๋กœ์ ํŠธ๊ฐ€ ์žˆ๋Š” ๊ณณ์ž…๋‹ˆ๋‹ค. ํ•ธ์ฆˆ์˜จ ๊ณผ์ •์—์„œ ์ฝ”ํ‹€๋ฆฐ ๋ฉ€ํ‹ฐํ”Œ๋žซํผ์„

Arawn Park 19 Sep 8, 2022