Skip to content

Experimental metrics support in Azure Event Hubs for Java library

Liudmila Molkova edited this page Feb 10, 2024 · 1 revision

Experimental metrics support in Azure EventHubs for Java library

EventHubs SDK is instrumented with OpenTelemetry to emit several experimental metrics. Please refer to Azure SDK metrics plugin documentation to enable and configure metrics.

They are subject to change and will comply with OpenTelemetry Semantic Conventions.

AMQP-level metrics

Metric: messaging.az.amqp.producer.send.duration

Duration of a low-level AMQP send operation. Reported for every try. Instrument: histogram Unit: milliseconds Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name
  • amqp.delivery_state - Delivery state

Metric: messaging.az.amqp.management.request.duration

Duration of a AMQP request-response operation. Reported for every try. Instrument: histogram Unit: milliseconds Attributes:

Metric: messaging.az.amqp.client.connections.closed

Number of closed connections. Instrument: counter Attributes:

  • server.address - EventHubs endpoint
  • amqp.error_condition - one of AMQP error conditions in case of an error.

Metric: messaging.az.amqp.client.transport.errors

Number of transport errors. Instrument: counter Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • amqp.error_condition - one of AMQP error conditions in case of an error.

Metric: messaging.az.amqp.client.link.errors

Number of AMQP links closed with error. Instrument: counter Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • messaging.az.entity_path - Entity path containing partition Id information if it's available.
  • amqp.error_condition - one of AMQP error conditions in case of an error.

Metric: messaging.az.amqp.client.session.errors

Number of AMQP sessions closed with error. Instrument: counter Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • messaging.az.entity_path - Entity path containing partition Id information if it's available.
  • amqp.error_condition - one of AMQP error conditions in case of an error.

Metric: messaging.az.amqp.consumer.sequence_number

Sequence number of the last message received from broker. Instrument: gauge Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • messaging.az.entity_path - Entity path containing partition Id information if it's available.

Metric: messaging.az.amqp.consumer.credits.requested

Number of requested credits. Instrument: counter Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • messaging.az.entity_path - Entity path containing partition Id information if it's available.

EventHubs metrics

Metric: messaging.eventhubs.events.sent

Number of events sent to the broker. Instrument: counter Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • messaging.az.partition_id - EvenHubs partition id (when available).
  • otel.status_code - error in case of a error.

Metric: messaging.eventhubs.consumer.lag

Approximate lag between the time message was received and the time it was enqueued on broker. Instrument: counter Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • messaging.az.partition_id - EvenHubs partition id (when available).
  • messaging.eventhubs.consumer_group - Consumer group name.
  • otel.status_code - error in case of a error.

Metric: messaging.eventhubs.checkpoint.duration

Duration of checkpoint call. Instrument: histogram Unit: milliseconds Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • messaging.az.partition_id - EvenHubs partition id (when available).
  • messaging.eventhubs.consumer_group - Consumer group name.
  • otel.status_code - error in case of a error.

Metric: messaging.eventhubs.checkpoint.sequence_number

Last checkpointed sequence number. Instrument: gauge Attributes:

  • server.address - EventHubs endpoint
  • messaging.destination.name - namespace name (when available)
  • messaging.az.partition_id - EvenHubs partition id (when available).
  • messaging.eventhubs.consumer_group - Consumer group name.
  • otel.status_code - error in case of a error.
Clone this wiki locally