Class DropwizardMetricsOptions

java.lang.Object
io.vertx.core.metrics.MetricsOptions
io.vertx.ext.dropwizard.DropwizardMetricsOptions

public class DropwizardMetricsOptions extends MetricsOptions
Vert.x Dropwizard metrics configuration.
Author:
Julien Viet
  • Field Details

    • DEFAULT_JMX_ENABLED

      public static final boolean DEFAULT_JMX_ENABLED
      The default value of JMX enabled = false
      See Also:
    • DEFAULT_MONITORED_HANDLERS

      public static final List<Match> DEFAULT_MONITORED_HANDLERS
      The default monitored handlers : null
    • DEFAULT_MONITORED_HTTP_SERVER_URIS

      public static final List<Match> DEFAULT_MONITORED_HTTP_SERVER_URIS
      The default monitored http server uris : null
    • DEFAULT_MONITORED_HTTP_SERVER_ROUTES

      public static final List<Match> DEFAULT_MONITORED_HTTP_SERVER_ROUTES
      The default monitored http server routes : null
    • DEFAULT_MONITORED_HTTP_CLIENT_URIS

      public static final List<Match> DEFAULT_MONITORED_HTTP_CLIENT_URIS
      The default monitored http client uris : null
    • DEFAULT_MONITORED_HTTP_CLIENT_ENDPOINTS

      public static final List<Match> DEFAULT_MONITORED_HTTP_CLIENT_ENDPOINTS
      The default monitored http client endpoints : null
  • Constructor Details

    • DropwizardMetricsOptions

      public DropwizardMetricsOptions()
      Default constructor
    • DropwizardMetricsOptions

      public DropwizardMetricsOptions(MetricsOptions other)
      Copy constructor with base metrics options
      Parameters:
      other - The other MetricsOptions to copy when creating this
    • DropwizardMetricsOptions

      public DropwizardMetricsOptions(DropwizardMetricsOptions other)
      Copy constructor
      Parameters:
      other - The other DropwizardMetricsOptions to copy when creating this
    • DropwizardMetricsOptions

      public DropwizardMetricsOptions(JsonObject json)
      Create an instance from a JsonObject
      Parameters:
      json - the JsonObject to create it from
  • Method Details

    • getRegistryName

      public String getRegistryName()
      An optional name used for registering the metrics in the Dropwizard shared registry.
      Returns:
      the registry name
    • setRegistryName

      public DropwizardMetricsOptions setRegistryName(String registryName)
      Set the name used for registering the metrics in the Dropwizard shared registry.
      Parameters:
      registryName - the name
      Returns:
      a reference to this, so the API can be used fluently
    • isJmxEnabled

      public boolean isJmxEnabled()
      Will JMX be enabled on the Vert.x instance?
      Returns:
      true if enabled, false if not.
    • setJmxEnabled

      public DropwizardMetricsOptions setJmxEnabled(boolean jmxEnabled)
      Set whether JMX will be enabled on the Vert.x instance.
      Parameters:
      jmxEnabled - true if JMX enabled, or false if not.
      Returns:
      a reference to this, so the API can be used fluently
    • getJmxDomain

      public String getJmxDomain()
      Get the JMX domain to use when JMX metrics are enabled.
      Returns:
      the JMX domain
    • setJmxDomain

      public DropwizardMetricsOptions setJmxDomain(String jmxDomain)
      Set the JMX domain to use when JMX metrics are enabled.
      Parameters:
      jmxDomain - the JMX domain
      Returns:
      a reference to this, so the API can be used fluently
    • getMonitoredEventBusHandlers

      public List<Match> getMonitoredEventBusHandlers()
      Returns:
      the list of monitored event bus handlers
    • addMonitoredEventBusHandler

      public DropwizardMetricsOptions addMonitoredEventBusHandler(Match match)
      Add a monitored event bus handler.
      Parameters:
      match - the event bus address match
      Returns:
      a reference to this, so the API can be used fluently
    • getMonitoredHttpServerUris

      public List<Match> getMonitoredHttpServerUris()
      Returns:
      the list of monitored http server uris
    • addMonitoredHttpServerUri

      public DropwizardMetricsOptions addMonitoredHttpServerUri(Match match)
      Add an monitored http server uri.
      Parameters:
      match - the handler match
      Returns:
      a reference to this, so the API can be used fluently
    • getMonitoredHttpServerRoutes

      public List<Match> getMonitoredHttpServerRoutes()
      Returns:
      the list of monitored http server routes
    • addMonitoredHttpServerRoute

      public DropwizardMetricsOptions addMonitoredHttpServerRoute(Match match)
      Add an monitored http server route.
      Parameters:
      match - the handler match
      Returns:
      a reference to this, so the API can be used fluently
    • getMonitoredHttpClientUris

      public List<Match> getMonitoredHttpClientUris()
      Returns:
      the list of monitored http client uris
    • setEnabled

      public DropwizardMetricsOptions setEnabled(boolean enable)
      Description copied from class: MetricsOptions
      Set whether metrics will be enabled on the Vert.x instance.
      Overrides:
      setEnabled in class MetricsOptions
      Parameters:
      enable - true if metrics enabled, or false if not.
      Returns:
      a reference to this, so the API can be used fluently
    • getConfigPath

      public String getConfigPath()
      Returns:
      the path for a config file to create an Options object from.
    • setConfigPath

      public DropwizardMetricsOptions setConfigPath(String configPath)
      Set the path for a config file that contains options in JSON format, to be used to create a new options object. The file will be looked for on the file system first and then on the classpath if it's not found.
      Parameters:
      configPath - the file name
      Returns:
      a reference to this, so the API can be used fluently
    • addMonitoredHttpClientUri

      public DropwizardMetricsOptions addMonitoredHttpClientUri(Match match)
      Add an monitored http client uri.
      Parameters:
      match - the handler match
      Returns:
      a reference to this, so the API can be used fluently
    • addMonitoredHttpClientEndpoint

      public DropwizardMetricsOptions addMonitoredHttpClientEndpoint(Match match)
      Add an monitored http client endpoint.
      Parameters:
      match - the handler match
      Returns:
      a reference to this, so the API can be used fluently
    • getMonitoredHttpClientEndpoint

      public List<Match> getMonitoredHttpClientEndpoint()
      Returns:
      the list of monitored http client endpoints
    • setBaseName

      public DropwizardMetricsOptions setBaseName(String baseName)
      Set a custom baseName for metrics.
      Parameters:
      baseName - the new baseName.
      Returns:
      a reference to this, so the API can be used fluently
    • getBaseName

      public String getBaseName()
      Returns:
      The custom baseName.
    • toJson

      public JsonObject toJson()
      Overrides:
      toJson in class MetricsOptions
      Returns:
      a JSON representation of these options