IceMX.MetricsAdmin

class IceMX.MetricsAdmin

Bases: Object, ABC

The metrics administrative facet interface. This interface allows remote administrative clients to access the metrics of an application that enabled the Ice administrative facility and configured one or more metrics views.

Notes

The Slice compiler generated this skeleton class from Slice interface ::IceMX::MetricsAdmin.

abstractmethod disableMetricsView(name: str, current: Current) None | Awaitable[None]

Disables a metrics view.

Parameters:
  • name (str) – The metrics view name.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

None or an awaitable that completes when the dispatch completes.

Return type:

None | Awaitable[None]

Raises:

UnknownMetricsView – Thrown when the metrics view cannot be found.

abstractmethod enableMetricsView(name: str, current: Current) None | Awaitable[None]

Enables a metrics view.

Parameters:
  • name (str) – The metrics view name.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

None or an awaitable that completes when the dispatch completes.

Return type:

None | Awaitable[None]

Raises:

UnknownMetricsView – Thrown when the metrics view cannot be found.

abstractmethod getMapMetricsFailures(view: str, map: str, current: Current) Sequence[MetricsFailures] | Awaitable[Sequence[MetricsFailures]]

Gets the metrics failures associated with the given view and map.

Parameters:
  • view (str) – The name of the metrics view.

  • map (str) – The name of the metrics map.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

The metrics failures associated with the map.

Return type:

Sequence[MetricsFailures] | Awaitable[Sequence[MetricsFailures]]

Raises:

UnknownMetricsView – Thrown when the metrics view cannot be found.

abstractmethod getMetricsFailures(view: str, map: str, id: str, current: Current) MetricsFailures | Awaitable[MetricsFailures]

Gets the metrics failure associated for the given metrics.

Parameters:
  • view (str) – The name of the metrics view.

  • map (str) – The name of the metrics map.

  • id (str) – The ID of the metrics.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

The metrics failures associated with the metrics.

Return type:

MetricsFailures | Awaitable[MetricsFailures]

Raises:

UnknownMetricsView – Thrown when the metrics view cannot be found.

abstractmethod getMetricsView(view: str, current: Current) tuple[Mapping[str, Sequence[Metrics | None]], int] | Awaitable[tuple[Mapping[str, Sequence[Metrics | None]], int]]

Gets the metrics objects for the given metrics view.

Parameters:
  • view (str) – The name of the metrics view.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

A tuple containing:
  • Mapping[str, Sequence[Metrics | None]] The metrics view data, a dictionary of metric maps for each metrics class configured with the view. The timestamp allows the client to compute averages which are not dependent of the invocation latency for this operation.

  • int The local time of the process when the metrics objects were retrieved.

Return type:

tuple[Mapping[str, Sequence[Metrics | None]], int] | Awaitable[tuple[Mapping[str, Sequence[Metrics | None]], int]]

Raises:

UnknownMetricsView – Thrown when the metrics view cannot be found.

abstractmethod getMetricsViewNames(current: Current) tuple[Sequence[str], Sequence[str]] | Awaitable[tuple[Sequence[str], Sequence[str]]]

Gets the names of enabled and disabled metrics.

Parameters:

current (Ice.Current) – The Current object for the dispatch.

Returns:

A tuple containing:
  • Sequence[str] The names of the enabled views.

  • Sequence[str] The names of the disabled views.

Return type:

tuple[Sequence[str], Sequence[str]] | Awaitable[tuple[Sequence[str], Sequence[str]]]

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str