io.vertx.micrometer

## Class VertxPrometheusOptions

- java.lang.Object
- - io.vertx.micrometer.VertxPrometheusOptions

-     public class VertxPrometheusOptions
      extends Object

  Options for Prometheus metrics backend.
  Author:
    Joel Takvorian

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_EMBEDDED_SERVER_ENDPOINT` The default metrics endpoint = /metrics when using an embedded server.
    `static boolean` | `DEFAULT_ENABLED` Default value for enabled = false.
    `static boolean` | `DEFAULT_PUBLISH_QUANTILES` Default value for publishing histogram quantiles = false.
    `static boolean` | `DEFAULT_START_EMBEDDED_SERVER` Default value for starting an embedded server = false.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VertxPrometheusOptions()` Default constructor
    `VertxPrometheusOptions(JsonObject json)` Create an instance from a `JsonObject`
    `VertxPrometheusOptions(VertxPrometheusOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getEmbeddedServerEndpoint()` Get the HTTP endpoint used if an embedded server is configured
    `HttpServerOptions` | `getEmbeddedServerOptions()` Get the HTTP server options of the embedded server, if any
    `boolean` | `isEnabled()` Will Prometheus reporting be enabled?
    `boolean` | `isPublishQuantiles()`
    `boolean` | `isStartEmbeddedServer()` Returns true if it is configured to init an embedded web server to expose Prometheus metrics
    `VertxPrometheusOptions` | `setEmbeddedServerEndpoint(String embeddedServerEndpoint)` Set metrics endpoint.
    `VertxPrometheusOptions` | `setEmbeddedServerOptions(HttpServerOptions embeddedServerOptions)` HTTP server options for the embedded server
    `VertxPrometheusOptions` | `setEnabled(boolean enabled)` Set true to enable Prometheus reporting
    `VertxPrometheusOptions` | `setPublishQuantiles(boolean publishQuantiles)` Set true to publish histogram stats, necessary to compute quantiles.
    `VertxPrometheusOptions` | `setStartEmbeddedServer(boolean startEmbeddedServer)` When true, an embedded server will init to expose metrics with Prometheus format.
    `JsonObject` | `toJson()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_ENABLED

          public static final boolean DEFAULT_ENABLED

      Default value for enabled = false.
      See Also:
        Constant Field Values

    - #### DEFAULT_START_EMBEDDED_SERVER

          public static final boolean DEFAULT_START_EMBEDDED_SERVER

      Default value for starting an embedded server = false.
      See Also:
        Constant Field Values

    - #### DEFAULT_EMBEDDED_SERVER_ENDPOINT

          public static final String DEFAULT_EMBEDDED_SERVER_ENDPOINT

      The default metrics endpoint = /metrics when using an embedded server.
      See Also:
        Constant Field Values

    - #### DEFAULT_PUBLISH_QUANTILES

          public static final boolean DEFAULT_PUBLISH_QUANTILES

      Default value for publishing histogram quantiles = false.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### VertxPrometheusOptions

          public VertxPrometheusOptions()

      Default constructor

    - #### VertxPrometheusOptions

          public VertxPrometheusOptions(VertxPrometheusOptions other)

      Copy constructor
      Parameters:
        `other` - The other `VertxPrometheusOptions` to copy when creating this

    - #### VertxPrometheusOptions

          public VertxPrometheusOptions(JsonObject json)

      Create an instance from a `JsonObject`
      Parameters:
        `json` - the JsonObject to create it from

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Returns:
        a JSON representation of these options

    - #### isEnabled

          public boolean isEnabled()

      Will Prometheus reporting be enabled?
      Returns:
        true if enabled, false if not.

    - #### setEnabled

          public VertxPrometheusOptions setEnabled(boolean enabled)

      Set true to enable Prometheus reporting

    - #### isStartEmbeddedServer

          public boolean isStartEmbeddedServer()

      Returns true if it is configured to init an embedded web server to expose Prometheus metrics

    - #### setStartEmbeddedServer

          public VertxPrometheusOptions setStartEmbeddedServer(boolean startEmbeddedServer)

      When true, an embedded server will init to expose metrics with Prometheus format.

    - #### getEmbeddedServerOptions

          public HttpServerOptions getEmbeddedServerOptions()

      Get the HTTP server options of the embedded server, if any

    - #### setEmbeddedServerOptions

          public VertxPrometheusOptions setEmbeddedServerOptions(HttpServerOptions embeddedServerOptions)

      HTTP server options for the embedded server
      Parameters:
        `embeddedServerOptions` - the server options

    - #### setEmbeddedServerEndpoint

          public VertxPrometheusOptions setEmbeddedServerEndpoint(String embeddedServerEndpoint)

      Set metrics endpoint. Use conjointly with the embedded server options. Defaults to /metrics.
      Parameters:
        `embeddedServerEndpoint` - metrics endpoint

    - #### getEmbeddedServerEndpoint

          public String getEmbeddedServerEndpoint()

      Get the HTTP endpoint used if an embedded server is configured

    - #### isPublishQuantiles

          public boolean isPublishQuantiles()

      Returns:
        true if quantile stats are published

    - #### setPublishQuantiles

          public VertxPrometheusOptions setPublishQuantiles(boolean publishQuantiles)

      Set true to publish histogram stats, necessary to compute quantiles. Note that it generates many new timeseries for stats, which is why it is deactivated by default.
      Parameters:
        `publishQuantiles` - the publishing quantiles flag
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2019 Eclipse. All rights reserved.