Class MeterNames

java.lang.Object
com.vaadin.observability.micrometer.MeterNames

public final class MeterNames extends Object
Names of the meters published by Observability Kit. These form the public telemetry contract scraped by metrics backends, so treat changes as breaking.
  • Field Details

    • SESSIONS_ACTIVE

      public static final String SESSIONS_ACTIVE
      Gauge: number of currently active Vaadin sessions.
      See Also:
    • SESSIONS_CREATED

      public static final String SESSIONS_CREATED
      See Also:
    • SESSIONS_DURATION

      public static final String SESSIONS_DURATION
      See Also:
    • SESSION_LOCK_WAIT

      public static final String SESSION_LOCK_WAIT
      See Also:
    • SESSION_LOCK_HOLD

      public static final String SESSION_LOCK_HOLD
      See Also:
    • UI_ACTIVE

      public static final String UI_ACTIVE
      See Also:
    • UI_CREATED

      public static final String UI_CREATED
      See Also:
    • UI_STATE_NODES

      public static final String UI_STATE_NODES
      Gauge: state-tree nodes retained across all tracked UIs — how much UI state the server currently holds for live users. Recorded only when UI state metrics are enabled.
      See Also:
    • UI_STATE_NODES_MAX

      public static final String UI_STATE_NODES_MAX
      Gauge: state-tree nodes held by the largest single UI.
      See Also:
    • UI_STATE_COMPONENTS

      public static final String UI_STATE_COMPONENTS
      Gauge: server-side component instances retained across all UIs.
      See Also:
    • UI_STATE_VIEWS

      public static final String UI_STATE_VIEWS
      Gauge: route-target and router-layout instances retained across all UIs. One navigation into a nested layout retains one per level, so this is a capacity figure; UI_STATE_VIEWS_STALE is the leak signal.
      See Also:
    • UI_STATE_VIEWS_STALE

      public static final String UI_STATE_VIEWS_STALE
      Gauge: retained views that are no longer part of their UI's active navigation, i.e. views that outlived it. Normally zero.
      See Also:
    • UI_STATE_SIZE

      public static final String UI_STATE_SIZE
      Gauge: retained UI state in bytes, node count times the configured cost per node. Registered only when ObservabilitySettings.getUiStateBytesPerNode() is greater than zero, because an unmeasured byte figure would be a guess.
      See Also:
    • UI_STATE_SAMPLE_AGE_MAX

      public static final String UI_STATE_SAMPLE_AGE_MAX
      Gauge: age in seconds of the stalest per-UI measurement in the aggregate. A UI is measured on its own session's thread, so an idle user's state is as old as their last interaction.
      See Also:
    • SESSION_STATE_NODES_MAX

      public static final String SESSION_STATE_NODES_MAX
      Gauge: state-tree nodes held by the largest single session.
      See Also:
    • SESSION_UIS_MAX

      public static final String SESSION_UIS_MAX
      Gauge: most UIs (browser tabs) held open by one session.
      See Also:
    • REQUEST_DURATION

      public static final String REQUEST_DURATION
      See Also:
    • ERRORS

      public static final String ERRORS
      Counter: server-side errors, tagged by TAG_EXCEPTION, TAG_ROUTE and TAG_COMPONENT.

      Counts both the exceptions that escape request handling and the ones Flow routes to the session ErrorHandler — the failures of component listeners, UI.access bodies and navigation callbacks, which is what a user actually experiences as a broken interaction.

      See Also:
    • CLIENT_BOOTSTRAP_DURATION

      public static final String CLIENT_BOOTSTRAP_DURATION
      See Also:
    • CLIENT_NAVIGATION_DURATION

      public static final String CLIENT_NAVIGATION_DURATION
      See Also:
    • CLIENT_RPC_DURATION

      public static final String CLIENT_RPC_DURATION
      See Also:
    • CLIENT_WEB_VITALS_LCP

      public static final String CLIENT_WEB_VITALS_LCP
      See Also:
    • CLIENT_WEB_VITALS_FCP

      public static final String CLIENT_WEB_VITALS_FCP
      See Also:
    • CLIENT_ERRORS

      public static final String CLIENT_ERRORS
      See Also:
    • CLIENT_CONNECTION

      public static final String CLIENT_CONNECTION
      Counter: transitions of the browser's connection state, tagged TAG_STATE with the state entered.

      Flow's client keeps the connection state in window.Vaadin.connectionState; the in-browser collector subscribes to it, so a user who loses the server and comes back leaves a trace the server side cannot produce on its own — it only sees a session that goes quiet and then talks again.

      The state Flow sets around every UIDL request to drive the loading indicator (loading) is not reported at all, and every transition is measured against the last state that was not it. So this counts real connection events rather than one per interaction, and a retry that fails mid-outage reads as an attempt rather than a recovery followed by a second loss.

      See Also:
    • CLIENT_CONNECTION_DOWNTIME

      public static final String CLIENT_CONNECTION_DOWNTIME
      Timer: how long a browser stayed unable to reach the server, recorded once per unreachable state it passed through and tagged TAG_STATE with that state.

      Per state rather than per outage, because Flow's two unreachable states mean different things: it enters STATE_RECONNECTING on the first failed request and only reaches STATE_CONNECTION_LOST once it has exhausted its retries. Time under reconnecting is therefore a network that hiccuped, time under connection-lost a server the browser has given up on — and a short outage that recovers while still retrying never enters connection-lost at all. Summing the two gives the length of the whole outage back.

      Measured on the browser's clock, because the report can only be sent once the connection it describes is back: subtracting a server arrival time would report clock skew plus buffering delay rather than the outage. A browser that never reconnects contributes nothing, so this timer under-reports total downtime by construction.

      See Also:
    • CLIENT_DROPPED

      public static final String CLIENT_DROPPED
      See Also:
    • CLIENT_THROTTLED

      public static final String CLIENT_THROTTLED
      See Also:
    • TAG_ROUTE

      public static final String TAG_ROUTE
      See Also:
    • TAG_OUTCOME

      public static final String TAG_OUTCOME
      Tag key: OUTCOME_SUCCESS or OUTCOME_ERROR. Also the low-cardinality key the Observation path uses (aliased there as ObservationNames.KEY_OUTCOME), so both paths tag identically.
      See Also:
    • TAG_EXCEPTION

      public static final String TAG_EXCEPTION
      Tag key: simple class name of the counted exception, capped at the route cardinality limit — a proxy or generated exception type can otherwise produce an unbounded stream of values, and here it multiplies with TAG_ROUTE and TAG_COMPONENT. Types beyond the limit are bucketed as EXCEPTION_OTHER.
      See Also:
    • EXCEPTION_OTHER

      public static final String EXCEPTION_OTHER
      TAG_EXCEPTION value for exception types beyond the cardinality limit.
      See Also:
    • TAG_ERROR

      public static final String TAG_ERROR
      Tag key: simple class name of the exception that ended the operation, or ERROR_NONE when it raised none. This mirrors the tag that DefaultMeterObservationHandler adds by itself on the Observation path; the binders add it explicitly on their direct-recording path so both paths publish the same tag-key set. Distinct from TAG_EXCEPTION, which tags the ERRORS counter.
      See Also:
    • ERROR_NONE

      public static final String ERROR_NONE
      TAG_ERROR value for an operation that raised no exception.
      See Also:
    • TAG_TRIGGER

      public static final String TAG_TRIGGER
      See Also:
    • TAG_KIND

      public static final String TAG_KIND
      See Also:
    • TRIGGER_BACK

      public static final String TRIGGER_BACK
      TAG_TRIGGER value on CLIENT_NAVIGATION_DURATION: the user went back or forward in browser history.
      See Also:
    • TRIGGER_PROGRAMMATIC

      public static final String TRIGGER_PROGRAMMATIC
      TAG_TRIGGER value on CLIENT_NAVIGATION_DURATION: the application navigated itself, through pushState or replaceState.
      See Also:
    • TRIGGER_UNKNOWN

      public static final String TRIGGER_UNKNOWN
      TAG_TRIGGER value for a trigger that is none of the above.
      See Also:
    • KIND_UNCAUGHT

      public static final String KIND_UNCAUGHT
      TAG_KIND value on CLIENT_ERRORS: an uncaught error reached the browser's error event.
      See Also:
    • KIND_PROMISE

      public static final String KIND_PROMISE
      TAG_KIND value on CLIENT_ERRORS: a promise was rejected with nobody handling it.
      See Also:
    • KIND_UNKNOWN

      public static final String KIND_UNKNOWN
      TAG_KIND value for a kind that is none of the above.
      See Also:
    • KINDS

      public static final Set<String> KINDS
      The TAG_KIND values a browser error may be attributed to, KIND_UNKNOWN aside. Held here because two enforcement points need the same set — the tag on the counter and the grouping key of the insight — and two copies of a bounded set is one copy too many.
    • TAG_STATE

      public static final String TAG_STATE
      Tag key: the browser connection state entered, on CLIENT_CONNECTION. Bounded to the values below, since the value originates in the browser and a crafted payload must not be able to grow the meter's cardinality.
      See Also:
    • STATE_CONNECTED

      public static final String STATE_CONNECTED
      TAG_STATE value: the browser can reach the server.
      See Also:
    • STATE_CONNECTION_LOST

      public static final String STATE_CONNECTION_LOST
      TAG_STATE value: the browser has lost the server.
      See Also:
    • STATE_RECONNECTING

      public static final String STATE_RECONNECTING
      TAG_STATE value: the browser is trying to get the server back.
      See Also:
    • STATE_UNKNOWN

      public static final String STATE_UNKNOWN
      TAG_STATE value for a state that is none of the above.
      See Also:
    • TAG_CONTEXT

      public static final String TAG_CONTEXT
      See Also:
    • TAG_COMPONENT

      public static final String TAG_COMPONENT
      Tag key: the Vaadin Component a measurement is attributed to, by simple class name.
      See Also:
    • OUTCOME_SUCCESS

      public static final String OUTCOME_SUCCESS
      See Also:
    • OUTCOME_ERROR

      public static final String OUTCOME_ERROR
      See Also:
    • OUTCOME_REROUTED

      public static final String OUTCOME_REROUTED
      TAG_OUTCOME value for a navigation that was replaced by a rerouteTo before it completed. Kept apart from OUTCOME_ERROR because rerouting is a normal routing decision (an access guard sending the user elsewhere), not a failure.
      See Also:
    • OUTCOME_FORWARDED

      public static final String OUTCOME_FORWARDED
      TAG_OUTCOME value for a navigation that was replaced by a forwardTo before it completed.
      See Also:
    • OUTCOME_UNKNOWN

      public static final String OUTCOME_UNKNOWN
      TAG_OUTCOME value for a navigation that was abandoned without any redirect flag and outside of a request that could have failed it, so neither success nor failure can be attributed to it. A re-entrant UI.navigate() from a view's beforeEnter or onAttach supersedes the navigation in flight this way, as does a UI detached while a navigation was still open.
      See Also:
    • CONTEXT_REQUEST

      public static final String CONTEXT_REQUEST
      See Also:
    • CONTEXT_ACCESS

      public static final String CONTEXT_ACCESS
      See Also:
    • ROUTE_OTHER

      public static final String ROUTE_OTHER
      See Also:
    • ROUTE_UNKNOWN

      public static final String ROUTE_UNKNOWN
      See Also:
    • COMPONENT_UNKNOWN

      public static final String COMPONENT_UNKNOWN
      TAG_COMPONENT value when no component could be resolved.
      See Also:
    • COMPONENT_OTHER

      public static final String COMPONENT_OTHER
      TAG_COMPONENT value for components beyond the cardinality limit.
      See Also:
    • RPC_DURATION

      public static final String RPC_DURATION
      Timer: server-side RPC invocation duration.
      See Also:
    • DB_FETCH_ROWS

      public static final String DB_FETCH_ROWS
      DistributionSummary: number of rows read from a JDBC ResultSet, tagged by TAG_ROUTE of the Vaadin view that triggered the fetch. Recorded only when database monitoring is enabled.
      See Also:
    • DATA_COUNT_DURATION

      public static final String DATA_COUNT_DURATION
      Timer: duration of a count query issued to a data provider, that is a query asking how many items a level holds. Tagged by TAG_OUTCOME and TAG_FILTERED.

      A hierarchical component issues one count per expanded parent, so a high count on this timer within few requests is the signature of an expensive hierarchy.

      See Also:
    • DATA_FETCH_DURATION

      public static final String DATA_FETCH_DURATION
      Timer: duration of a fetch query issued to a data provider, that is a query loading one page of items. Measured around consumption of the items, so it covers the backend round-trip even for a lazily evaluated stream. Tagged by TAG_OUTCOME and TAG_FILTERED.
      See Also:
    • DATA_FETCH_ROWS

      public static final String DATA_FETCH_ROWS
      DistributionSummary: number of items a fetch query actually returned, tagged by TAG_ROUTE. Compare against DATA_FETCH_REQUESTED to spot a component asking for far more than it renders, or a data provider returning short pages.
      See Also:
    • DATA_FETCH_REQUESTED

      public static final String DATA_FETCH_REQUESTED
      DistributionSummary: number of items a fetch query asked for, tagged by TAG_ROUTE.
      See Also:
    • TAG_FILTERED

      public static final String TAG_FILTERED
      Tag key: whether the data provider query carried a filter, which separates a combo box loading matches for typed text from one loading the whole data set. Low cardinality: true or false.
      See Also:
    • TAG_TYPE

      public static final String TAG_TYPE
      Tag key: RPC invocation type.
      See Also:
    • RESYNC

      public static final String RESYNC
      Counter: UIDL message recovery events observed on incoming requests. Tagged by TAG_TYPE with RESYNC_TYPE_RESEND or RESYNC_TYPE_RESYNC.
      See Also:
    • RESYNC_TYPE_RESEND

      public static final String RESYNC_TYPE_RESEND
      TAG_TYPE value for a duplicate message the client re-sent because it never received the previous response; the server replays its cached response.
      See Also:
    • RESYNC_TYPE_RESYNC

      public static final String RESYNC_TYPE_RESYNC
      TAG_TYPE value for a full client-requested resynchronization (the client gave up waiting for a missing server message and asked for a full UI-state rebuild).
      See Also: