Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MicrometerMetricsOptions

Vert.x micrometer configuration.

It is required to set either influxDbOptions, prometheusOptions or jmxMetricsOptions (or, programmatically, micrometerRegistry) in order to actually report metrics.

Hierarchy

  • any
    • MicrometerMetricsOptions

Index

Constructors

constructor

Methods

addLabelMatch

  • Add a rule for label matching.

    Parameters

    Returns MicrometerMetricsOptions

getDisabledMetricsCategories

  • getDisabledMetricsCategories(): string[]
  • Sets metrics types that are disabled.

    Returns string[]

getFactory

  • getFactory(): any
  • Returns any

getInfluxDbOptions

  • Set InfluxDB options. Setting a registry backend option is mandatory in order to effectively report metrics.

    Returns VertxInfluxDbOptions

getJmxMetricsOptions

  • Set JMX metrics options. Setting a registry backend option is mandatory in order to effectively report metrics.

    Returns VertxJmxMetricsOptions

getLabelMatches

  • getLabelMatches(): Match[]
  • Set a list of rules for label matching.

    Returns Match[]

getLabels

getMetricsNaming

  • MetricsNaming is a structure that holds names of all metrics, each one can be changed individually. For instance, to retrieve compatibility with the names used in Vert.x 3.x, use setMetricsNaming(MetricsNaming.v3Names())

    Returns MetricsNaming

getMicrometerRegistry

  • getMicrometerRegistry(): any
  • Programmatically set the Micrometer MeterRegistry to be used by Vert.x.

    This is useful in several scenarios, such as:

    • if there is already a MeterRegistry used in the application that should be used by Vert.x as well.
    • to define some backend configuration that is not covered in this module (example: reporting to non-covered backends such as New Relic)
    • to use Micrometer's CompositeRegistry

    This setter is mutually exclusive with setInfluxDbOptions/setPrometheusOptions/setJmxMetricsOptions and takes precedence over them.

    Returns any

getPrometheusOptions

  • Set Prometheus options. Setting a registry backend option is mandatory in order to effectively report metrics.

    Returns VertxPrometheusOptions

getRegistryName

  • getRegistryName(): string
  • Set a name for the metrics registry, so that a new registry will be created and associated with this name. If registryName is not provided (or null), a default registry will be used. If the same name is given to several Vert.x instances (within the same JVM), they will share the same registry.

    Returns string

isEnabled

  • isEnabled(): boolean
  • Set whether metrics will be enabled on the Vert.x instance. Metrics are not enabled by default.

    Returns boolean

isJvmMetricsEnabled

  • isJvmMetricsEnabled(): boolean
  • Whether JVM metrics should be collected. Defaults to false.

    Returns boolean

setDisabledMetricsCategories

  • Sets metrics types that are disabled.

    Parameters

    • disabledMetricsCategories: string[]

    Returns MicrometerMetricsOptions

setEnabled

  • Set whether metrics will be enabled on the Vert.x instance. Metrics are not enabled by default.

    Parameters

    • enabled: boolean

    Returns MicrometerMetricsOptions

setFactory

  • Parameters

    • factory: any

    Returns MicrometerMetricsOptions

setInfluxDbOptions

  • Set InfluxDB options. Setting a registry backend option is mandatory in order to effectively report metrics.

    Parameters

    Returns MicrometerMetricsOptions

setJmxMetricsOptions

  • Set JMX metrics options. Setting a registry backend option is mandatory in order to effectively report metrics.

    Parameters

    Returns MicrometerMetricsOptions

setJvmMetricsEnabled

  • Whether JVM metrics should be collected. Defaults to false.

    Parameters

    • jvmMetricsEnabled: boolean

    Returns MicrometerMetricsOptions

setLabelMatches

  • Set a list of rules for label matching.

    Parameters

    Returns MicrometerMetricsOptions

setLabels

setMetricsNaming

  • MetricsNaming is a structure that holds names of all metrics, each one can be changed individually. For instance, to retrieve compatibility with the names used in Vert.x 3.x, use setMetricsNaming(MetricsNaming.v3Names())

    Parameters

    Returns MicrometerMetricsOptions

setMicrometerRegistry

  • Programmatically set the Micrometer MeterRegistry to be used by Vert.x.

    This is useful in several scenarios, such as:

    • if there is already a MeterRegistry used in the application that should be used by Vert.x as well.
    • to define some backend configuration that is not covered in this module (example: reporting to non-covered backends such as New Relic)
    • to use Micrometer's CompositeRegistry

    This setter is mutually exclusive with setInfluxDbOptions/setPrometheusOptions/setJmxMetricsOptions and takes precedence over them.

    Parameters

    • micrometerRegistry: any

    Returns MicrometerMetricsOptions

setPrometheusOptions

  • Set Prometheus options. Setting a registry backend option is mandatory in order to effectively report metrics.

    Parameters

    Returns MicrometerMetricsOptions

setRegistryName

  • Set a name for the metrics registry, so that a new registry will be created and associated with this name. If registryName is not provided (or null), a default registry will be used. If the same name is given to several Vert.x instances (within the same JVM), they will share the same registry.

    Parameters

    • registryName: string

    Returns MicrometerMetricsOptions

toJson

  • toJson(): {}
  • Returns {}

    • [key: string]: any

Generated using TypeDoc