4.x ServerCdiExtension
creates metrics observers using its provider, even though the metrics extension already added it to the server
#7980
Projects
Milestone
Environment Details
Problem Description
With metrics the CDI extension creates the metrics observer using special settings beyond what might be in the normal place in configuration and then adds it to the server.
But even so, the
ServerCdiExtension
triggers creation of another metrics observer (because the metrics observer provider is on the class path) even though the metrics CDI extension already created one.This duplication causes the global meter registry to be overwritten, discarding previously-registered meters and proceeding with incorrect configuration settings for the meter registry.
Steps to reproduce
Set a breakpoint at the
MetricsObserver
constructor.It will be invoked twice, first from the
MetricsCdiExtension
and then fromServerCdiExtension
gathering all observers via their providers.The text was updated successfully, but these errors were encountered: