Interface MetricsService.MetricsContext

    • Field Detail

      • SERVER_CONTEXT_NAME

        static final String SERVER_CONTEXT_NAME
        The global or server context name cannot have any name but the empty string as all other names potentially are application names used by deployed applications.
        See Also:
        Constant Field Values
    • Method Detail

      • getName

        String getName()
        Returns:
        the name of this context which is either the name of the application this context is linked to or the empty string in case of the server context
      • isServerContext

        default boolean isServerContext()
      • getRegistry

        org.eclipse.microprofile.metrics.MetricRegistry getRegistry​(org.eclipse.microprofile.metrics.MetricRegistry.Type type)
                                                             throws NoSuchRegistryException
        Access a MetricRegistry of this context. Each context has one instance of each type except the server context does not have an application type registry.
        Parameters:
        type - the type of MetricRegistry to access
        Returns:
        the MetricRegistry instance for the type in this context
        Throws:
        NoSuchRegistryException - In case asking for a MetricRegistry.Type.APPLICATION registry in the server (global) context.
      • getBaseRegistry

        default org.eclipse.microprofile.metrics.MetricRegistry getBaseRegistry()
      • getVendorRegistry

        default org.eclipse.microprofile.metrics.MetricRegistry getVendorRegistry()