Git Product home page Git Product logo

Comments (2)

tjquinno avatar tjquinno commented on June 15, 2024 1

What you say is true for SE. This issue addresses MP, which still uses separate MP MetricRegistry instances for each scope as in the MP Metrics spec.

Previously, users could invoke RegistryFactory.getInstance().getRegistry(registryType) from SE or MP code to get the MetricRegistry for a particular type (now called scope). RegistryFactory has moved into helidon-microprofile-metrics in 4.0 and is currently package-private.

Currently the developer of an MP app can use injection to get a reference to a MetricRegistry if the scope name is known at compile-time, but there is no way to retrieve a given scope's MetricRegistry programmatically.

There are no public elements on RegistryFactory currently in 4.0, so one way we could allow this use case would be to change the RegistryFactory class to public and add a single static method:

public static MetricRegistry getRegistry(String scopeName) {
    return getInstance().getRegistry(scopeName);
}

This would not expose any of the existing methods or their types publicly while keeping an API close to what Helidon 3 developers had used previously.

from helidon.

tomas-langer avatar tomas-langer commented on June 15, 2024

What is the use case here?
I thought that we have Metrics.globalRegistry() that supports creating and getting meters for specific scopes...

from helidon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.