Class MetricNames

java.lang.Object
org.acemq.amqp.api.MetricNames

public final class MetricNames extends Object
The metric and span names AceMQ emits.

These are public API in the same sense the envelope headers are. A dashboard, an alert rule and a service-level objective are all written against these strings, and every language port emits the same ones so that a polyglot estate can be watched on one dashboard. Renaming one silently breaks alerting in a way no compiler will catch, so they are frozen and changed only in a major version.

  • Field Details

    • PUBLISH_DURATION

      public static final String PUBLISH_DURATION
      Time from calling send to the broker confirming, tagged with the outcome.
      See Also:
    • PUBLISH_TOTAL

      public static final String PUBLISH_TOTAL
      Messages published, tagged with the outcome.
      See Also:
    • CONSUME_DURATION

      public static final String CONSUME_DURATION
      Time spent in a handler, tagged with the outcome.
      See Also:
    • CONSUME_TOTAL

      public static final String CONSUME_TOTAL
      Deliveries handled, tagged with the outcome.
      See Also:
    • CONSUME_ATTEMPTS

      public static final String CONSUME_ATTEMPTS
      Which attempt a delivery was, so a rising distribution shows a struggling dependency.
      See Also:
    • CONSUME_IN_FLIGHT

      public static final String CONSUME_IN_FLIGHT
      Deliveries currently in a handler, bounded by prefetch times concurrency.
      See Also:
    • RETRIED_TOTAL

      public static final String RETRIED_TOTAL
      Messages sent to a retry queue.
      See Also:
    • DEAD_LETTERED_TOTAL

      public static final String DEAD_LETTERED_TOTAL
      Messages sent to a dead-letter or parking queue, tagged with TAG_OUTCOME.
      See Also:
    • SET_ASIDE_FAILED

      public static final String SET_ASIDE_FAILED
      Messages that could not be moved to a dead-letter or parking queue, tagged with TAG_QUEUE and TAG_TARGET.

      The counter that separates two failures which look identical from anywhere else. A message dead-lettered normally leaves the source queue and appears in the dead-letter queue; a message whose dead-letter queue was never declared leaves the source queue and appears nowhere, because the republish failed and the delivery went back to the broker with nothing to catch it. Queue depths show the same picture in both cases — one queue going down — and only this number says which of the two happened.

      Worth an alert at any value above zero. It does not rise under load or during a deploy; it rises when a topology is wrong.

      See Also:
    • RUNG_MISSING

      public static final String RUNG_MISSING
      Retries that had to wait in the consumer because the rung queue they belonged in is not on the broker, tagged with TAG_QUEUE and TAG_RUNG.

      Nothing breaks: the message is still retried and the wait still happens. What is lost is the reason the rung exists — a consumer restarted mid-wait turns a five-minute backoff into no backoff at all — and the only other sign of it is a log line on a path nobody watches.

      See Also:
    • REQUEST_DURATION

      public static final String REQUEST_DURATION
      Round trip of a request/reply call, as the caller experienced it.
      See Also:
    • REQUEST_TOTAL

      public static final String REQUEST_TOTAL
      Request/reply calls, tagged with TAG_OUTCOME.
      See Also:
    • OUTBOX_LAG

      public static final String OUTBOX_LAG
      How long an outbox record waited between being committed and being published.

      The one number that reveals a stopped relay. A committed, unpublished row is a message that exists and is owed to somebody, and it appears in no queue depth anywhere.

      See Also:
    • OUTBOX_TOTAL

      public static final String OUTBOX_TOTAL
      Outbox records the relay has handled, tagged with TAG_OUTCOME.
      See Also:
    • PIPELINE_RUN_DURATION

      public static final String PIPELINE_RUN_DURATION
      How long a message had existed when it left a pipeline.
      See Also:
    • PIPELINE_RUN_TOTAL

      public static final String PIPELINE_RUN_TOTAL
      Pipeline runs that finished, tagged with TAG_OUTCOME and TAG_STEP.
      See Also:
    • TAG_EXCHANGE

      public static final String TAG_EXCHANGE
      Exchange a message was published to; empty string for the default exchange.
      See Also:
    • TAG_ROUTING_KEY

      public static final String TAG_ROUTING_KEY
      Routing key used, or the queue name when publishing without an exchange.
      See Also:
    • TAG_QUEUE

      public static final String TAG_QUEUE
      Queue a delivery came from.
      See Also:
    • TAG_TRANSPORT

      public static final String TAG_TRANSPORT
      Transport short name, such as rabbitmq.
      See Also:
    • TAG_MESSAGE_TYPE

      public static final String TAG_MESSAGE_TYPE
      Logical message type from the envelope.
      See Also:
    • TAG_TARGET

      public static final String TAG_TARGET
      Where a message was being set aside to when that failed: the dead-letter queue or the parking lot. Bounded by the topology, so it is safe as a tag.
      See Also:
    • TAG_RUNG

      public static final String TAG_RUNG
      The retry rung a wait belonged in, such as orders.new.retry.40s.

      Bounded by the retry policy, which names a fixed handful of rungs, so it is safe as a tag. It is what makes RUNG_MISSING actionable: the counter says a rung is not there and this says which one to declare.

      See Also:
    • TAG_OUTCOME

      public static final String TAG_OUTCOME
      What happened. One of confirmed, unroutable, failed, refused for a publish; acked, retried, dead_lettered, parked, rejected, in_progress for a delivery.
      See Also:
    • OUTCOME_CONFIRMED

      public static final String OUTCOME_CONFIRMED
      See Also:
    • OUTCOME_UNROUTABLE

      public static final String OUTCOME_UNROUTABLE
      See Also:
    • OUTCOME_FAILED

      public static final String OUTCOME_FAILED
      See Also:
    • OUTCOME_REFUSED

      public static final String OUTCOME_REFUSED
      A publish the library declined to send: nothing was written to the broker.

      Distinct from OUTCOME_FAILED, which means a message that may have been lost (nacked, never confirmed, unwritable). A refused publish cannot have been lost, because the caller still holds it. It is recorded for PublishingPausedException, and for a ConnectionBlockedException whose mayHaveBeenPublished() is false. Sharing one value put deliberate back pressure on the same graph as data loss.

      See Also:
    • OUTCOME_ACKED

      public static final String OUTCOME_ACKED
      See Also:
    • OUTCOME_RETRIED

      public static final String OUTCOME_RETRIED
      See Also:
    • OUTCOME_DEAD_LETTERED

      public static final String OUTCOME_DEAD_LETTERED
      See Also:
    • OUTCOME_PARKED

      public static final String OUTCOME_PARKED
      A message set aside in the parking lot rather than the dead-letter queue.

      Distinct from OUTCOME_DEAD_LETTERED because the two mean different things to whoever is on call. Dead-lettered is "this failed as many times as the policy allows", which is usually a dependency being down and usually fixes itself. Parked is "nothing can read this message" — a payload that will not decode, which will not decode on any future attempt either — and it is a deploy or a schema problem that will not fix itself. Sharing one outcome value would put both on the same graph and make neither actionable.

      See Also:
    • OUTCOME_REJECTED

      public static final String OUTCOME_REJECTED
      See Also:
    • OUTCOME_IN_PROGRESS

      public static final String OUTCOME_IN_PROGRESS
      A delivery whose identifier another consumer has claimed and not yet confirmed.

      Neither acknowledged nor handled: it goes back to the source queue, its attempt counter untouched, to be tried again once the claim is confirmed or its lease runs out. Distinct from OUTCOME_ACKED, which a duplicate of confirmed work records, because this message has not been handled by anyone yet.

      See Also:
    • OUTCOME_ANSWERED

      public static final String OUTCOME_ANSWERED
      See Also:
    • OUTCOME_TIMED_OUT

      public static final String OUTCOME_TIMED_OUT
      See Also:
    • OUTCOME_PUBLISHED

      public static final String OUTCOME_PUBLISHED
      See Also:
    • OUTCOME_COMPLETED

      public static final String OUTCOME_COMPLETED
      See Also:
    • OUTCOME_ENDED_EARLY

      public static final String OUTCOME_ENDED_EARLY
      See Also:
    • TAG_PIPELINE

      public static final String TAG_PIPELINE
      Pipeline a run belongs to.
      See Also:
    • TAG_STEP

      public static final String TAG_STEP
      Step a pipeline run was at when it finished.
      See Also:
    • SPAN_PUBLISH_SUFFIX

      public static final String SPAN_PUBLISH_SUFFIX
      Span covering a publish. Rendered as <destination> publish.
      See Also:
    • SPAN_PROCESS_SUFFIX

      public static final String SPAN_PROCESS_SUFFIX
      Span covering a handler running. Rendered as <queue> process.
      See Also:
    • SPAN_REQUEST_SUFFIX

      public static final String SPAN_REQUEST_SUFFIX
      Span covering a whole request/reply round trip. Rendered as <destination> request.
      See Also: