aiohomematic 2026.1.29__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aiohomematic/__init__.py +110 -0
- aiohomematic/_log_context_protocol.py +29 -0
- aiohomematic/api.py +410 -0
- aiohomematic/async_support.py +250 -0
- aiohomematic/backend_detection.py +462 -0
- aiohomematic/central/__init__.py +103 -0
- aiohomematic/central/async_rpc_server.py +760 -0
- aiohomematic/central/central_unit.py +1152 -0
- aiohomematic/central/config.py +463 -0
- aiohomematic/central/config_builder.py +772 -0
- aiohomematic/central/connection_state.py +160 -0
- aiohomematic/central/coordinators/__init__.py +38 -0
- aiohomematic/central/coordinators/cache.py +414 -0
- aiohomematic/central/coordinators/client.py +480 -0
- aiohomematic/central/coordinators/connection_recovery.py +1141 -0
- aiohomematic/central/coordinators/device.py +1166 -0
- aiohomematic/central/coordinators/event.py +514 -0
- aiohomematic/central/coordinators/hub.py +532 -0
- aiohomematic/central/decorators.py +184 -0
- aiohomematic/central/device_registry.py +229 -0
- aiohomematic/central/events/__init__.py +104 -0
- aiohomematic/central/events/bus.py +1392 -0
- aiohomematic/central/events/integration.py +424 -0
- aiohomematic/central/events/types.py +194 -0
- aiohomematic/central/health.py +762 -0
- aiohomematic/central/rpc_server.py +353 -0
- aiohomematic/central/scheduler.py +794 -0
- aiohomematic/central/state_machine.py +391 -0
- aiohomematic/client/__init__.py +203 -0
- aiohomematic/client/_rpc_errors.py +187 -0
- aiohomematic/client/backends/__init__.py +48 -0
- aiohomematic/client/backends/base.py +335 -0
- aiohomematic/client/backends/capabilities.py +138 -0
- aiohomematic/client/backends/ccu.py +487 -0
- aiohomematic/client/backends/factory.py +116 -0
- aiohomematic/client/backends/homegear.py +294 -0
- aiohomematic/client/backends/json_ccu.py +252 -0
- aiohomematic/client/backends/protocol.py +316 -0
- aiohomematic/client/ccu.py +1857 -0
- aiohomematic/client/circuit_breaker.py +459 -0
- aiohomematic/client/config.py +64 -0
- aiohomematic/client/handlers/__init__.py +40 -0
- aiohomematic/client/handlers/backup.py +157 -0
- aiohomematic/client/handlers/base.py +79 -0
- aiohomematic/client/handlers/device_ops.py +1085 -0
- aiohomematic/client/handlers/firmware.py +144 -0
- aiohomematic/client/handlers/link_mgmt.py +199 -0
- aiohomematic/client/handlers/metadata.py +436 -0
- aiohomematic/client/handlers/programs.py +144 -0
- aiohomematic/client/handlers/sysvars.py +100 -0
- aiohomematic/client/interface_client.py +1304 -0
- aiohomematic/client/json_rpc.py +2068 -0
- aiohomematic/client/request_coalescer.py +282 -0
- aiohomematic/client/rpc_proxy.py +629 -0
- aiohomematic/client/state_machine.py +324 -0
- aiohomematic/const.py +2207 -0
- aiohomematic/context.py +275 -0
- aiohomematic/converter.py +270 -0
- aiohomematic/decorators.py +390 -0
- aiohomematic/exceptions.py +185 -0
- aiohomematic/hmcli.py +997 -0
- aiohomematic/i18n.py +193 -0
- aiohomematic/interfaces/__init__.py +407 -0
- aiohomematic/interfaces/central.py +1067 -0
- aiohomematic/interfaces/client.py +1096 -0
- aiohomematic/interfaces/coordinators.py +63 -0
- aiohomematic/interfaces/model.py +1921 -0
- aiohomematic/interfaces/operations.py +217 -0
- aiohomematic/logging_context.py +134 -0
- aiohomematic/metrics/__init__.py +125 -0
- aiohomematic/metrics/_protocols.py +140 -0
- aiohomematic/metrics/aggregator.py +534 -0
- aiohomematic/metrics/dataclasses.py +489 -0
- aiohomematic/metrics/emitter.py +292 -0
- aiohomematic/metrics/events.py +183 -0
- aiohomematic/metrics/keys.py +300 -0
- aiohomematic/metrics/observer.py +563 -0
- aiohomematic/metrics/stats.py +172 -0
- aiohomematic/model/__init__.py +189 -0
- aiohomematic/model/availability.py +65 -0
- aiohomematic/model/calculated/__init__.py +89 -0
- aiohomematic/model/calculated/climate.py +276 -0
- aiohomematic/model/calculated/data_point.py +315 -0
- aiohomematic/model/calculated/field.py +147 -0
- aiohomematic/model/calculated/operating_voltage_level.py +286 -0
- aiohomematic/model/calculated/support.py +232 -0
- aiohomematic/model/custom/__init__.py +214 -0
- aiohomematic/model/custom/capabilities/__init__.py +67 -0
- aiohomematic/model/custom/capabilities/climate.py +41 -0
- aiohomematic/model/custom/capabilities/light.py +87 -0
- aiohomematic/model/custom/capabilities/lock.py +44 -0
- aiohomematic/model/custom/capabilities/siren.py +63 -0
- aiohomematic/model/custom/climate.py +1130 -0
- aiohomematic/model/custom/cover.py +722 -0
- aiohomematic/model/custom/data_point.py +360 -0
- aiohomematic/model/custom/definition.py +300 -0
- aiohomematic/model/custom/field.py +89 -0
- aiohomematic/model/custom/light.py +1174 -0
- aiohomematic/model/custom/lock.py +322 -0
- aiohomematic/model/custom/mixins.py +445 -0
- aiohomematic/model/custom/profile.py +945 -0
- aiohomematic/model/custom/registry.py +251 -0
- aiohomematic/model/custom/siren.py +462 -0
- aiohomematic/model/custom/switch.py +195 -0
- aiohomematic/model/custom/text_display.py +289 -0
- aiohomematic/model/custom/valve.py +78 -0
- aiohomematic/model/data_point.py +1416 -0
- aiohomematic/model/device.py +1840 -0
- aiohomematic/model/event.py +216 -0
- aiohomematic/model/generic/__init__.py +327 -0
- aiohomematic/model/generic/action.py +40 -0
- aiohomematic/model/generic/action_select.py +62 -0
- aiohomematic/model/generic/binary_sensor.py +30 -0
- aiohomematic/model/generic/button.py +31 -0
- aiohomematic/model/generic/data_point.py +177 -0
- aiohomematic/model/generic/dummy.py +150 -0
- aiohomematic/model/generic/number.py +76 -0
- aiohomematic/model/generic/select.py +56 -0
- aiohomematic/model/generic/sensor.py +76 -0
- aiohomematic/model/generic/switch.py +54 -0
- aiohomematic/model/generic/text.py +33 -0
- aiohomematic/model/hub/__init__.py +100 -0
- aiohomematic/model/hub/binary_sensor.py +24 -0
- aiohomematic/model/hub/button.py +28 -0
- aiohomematic/model/hub/connectivity.py +190 -0
- aiohomematic/model/hub/data_point.py +342 -0
- aiohomematic/model/hub/hub.py +864 -0
- aiohomematic/model/hub/inbox.py +135 -0
- aiohomematic/model/hub/install_mode.py +393 -0
- aiohomematic/model/hub/metrics.py +208 -0
- aiohomematic/model/hub/number.py +42 -0
- aiohomematic/model/hub/select.py +52 -0
- aiohomematic/model/hub/sensor.py +37 -0
- aiohomematic/model/hub/switch.py +43 -0
- aiohomematic/model/hub/text.py +30 -0
- aiohomematic/model/hub/update.py +221 -0
- aiohomematic/model/support.py +592 -0
- aiohomematic/model/update.py +140 -0
- aiohomematic/model/week_profile.py +1827 -0
- aiohomematic/property_decorators.py +719 -0
- aiohomematic/py.typed +0 -0
- aiohomematic/rega_scripts/accept_device_in_inbox.fn +51 -0
- aiohomematic/rega_scripts/create_backup_start.fn +28 -0
- aiohomematic/rega_scripts/create_backup_status.fn +89 -0
- aiohomematic/rega_scripts/fetch_all_device_data.fn +97 -0
- aiohomematic/rega_scripts/get_backend_info.fn +25 -0
- aiohomematic/rega_scripts/get_inbox_devices.fn +61 -0
- aiohomematic/rega_scripts/get_program_descriptions.fn +31 -0
- aiohomematic/rega_scripts/get_serial.fn +44 -0
- aiohomematic/rega_scripts/get_service_messages.fn +83 -0
- aiohomematic/rega_scripts/get_system_update_info.fn +39 -0
- aiohomematic/rega_scripts/get_system_variable_descriptions.fn +31 -0
- aiohomematic/rega_scripts/set_program_state.fn +17 -0
- aiohomematic/rega_scripts/set_system_variable.fn +19 -0
- aiohomematic/rega_scripts/trigger_firmware_update.fn +67 -0
- aiohomematic/schemas.py +256 -0
- aiohomematic/store/__init__.py +55 -0
- aiohomematic/store/dynamic/__init__.py +43 -0
- aiohomematic/store/dynamic/command.py +250 -0
- aiohomematic/store/dynamic/data.py +175 -0
- aiohomematic/store/dynamic/details.py +187 -0
- aiohomematic/store/dynamic/ping_pong.py +416 -0
- aiohomematic/store/persistent/__init__.py +71 -0
- aiohomematic/store/persistent/base.py +285 -0
- aiohomematic/store/persistent/device.py +233 -0
- aiohomematic/store/persistent/incident.py +380 -0
- aiohomematic/store/persistent/paramset.py +241 -0
- aiohomematic/store/persistent/session.py +556 -0
- aiohomematic/store/serialization.py +150 -0
- aiohomematic/store/storage.py +689 -0
- aiohomematic/store/types.py +526 -0
- aiohomematic/store/visibility/__init__.py +40 -0
- aiohomematic/store/visibility/parser.py +141 -0
- aiohomematic/store/visibility/registry.py +722 -0
- aiohomematic/store/visibility/rules.py +307 -0
- aiohomematic/strings.json +237 -0
- aiohomematic/support.py +706 -0
- aiohomematic/tracing.py +236 -0
- aiohomematic/translations/de.json +237 -0
- aiohomematic/translations/en.json +237 -0
- aiohomematic/type_aliases.py +51 -0
- aiohomematic/validator.py +128 -0
- aiohomematic-2026.1.29.dist-info/METADATA +296 -0
- aiohomematic-2026.1.29.dist-info/RECORD +188 -0
- aiohomematic-2026.1.29.dist-info/WHEEL +5 -0
- aiohomematic-2026.1.29.dist-info/entry_points.txt +2 -0
- aiohomematic-2026.1.29.dist-info/licenses/LICENSE +21 -0
- aiohomematic-2026.1.29.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (c) 2021-2026
|
|
3
|
+
"""
|
|
4
|
+
Type-safe metric keys for the metrics system.
|
|
5
|
+
|
|
6
|
+
This module provides a type-safe way to define and use metric keys throughout
|
|
7
|
+
the codebase. Using MetricKey and MetricKeys ensures consistent naming and
|
|
8
|
+
enables IDE autocompletion.
|
|
9
|
+
|
|
10
|
+
Public API
|
|
11
|
+
----------
|
|
12
|
+
- MetricKey: Frozen dataclass representing a metric key
|
|
13
|
+
- MetricKeys: Factory class with static methods for all known metric keys
|
|
14
|
+
|
|
15
|
+
Usage
|
|
16
|
+
-----
|
|
17
|
+
from aiohomematic.metrics import MetricKeys, emit_latency
|
|
18
|
+
|
|
19
|
+
# Emit with type-safe key
|
|
20
|
+
emit_latency(
|
|
21
|
+
event_bus=event_bus,
|
|
22
|
+
key=MetricKeys.ping_pong_rtt(interface_id="hmip_rf"),
|
|
23
|
+
duration_ms=42.5,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
# Query with type-safe key
|
|
27
|
+
tracker = observer.get_latency(MetricKeys.ping_pong_rtt(interface_id="hmip_rf"))
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
from __future__ import annotations
|
|
31
|
+
|
|
32
|
+
from dataclasses import dataclass
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
@dataclass(frozen=True, slots=True)
|
|
36
|
+
class MetricKey:
|
|
37
|
+
"""
|
|
38
|
+
Type-safe metric key with component, metric, and optional identifier.
|
|
39
|
+
|
|
40
|
+
The string representation follows the pattern: {component}.{metric}.{identifier}
|
|
41
|
+
or {component}.{metric} if no identifier is provided.
|
|
42
|
+
|
|
43
|
+
Attributes:
|
|
44
|
+
component: The component emitting the metric (e.g., "ping_pong", "cache").
|
|
45
|
+
metric: The specific metric being tracked (e.g., "rtt", "hit").
|
|
46
|
+
identifier: Optional identifier for the metric instance (e.g., interface_id).
|
|
47
|
+
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
component: str
|
|
51
|
+
metric: str
|
|
52
|
+
identifier: str = ""
|
|
53
|
+
|
|
54
|
+
def __str__(self) -> str:
|
|
55
|
+
"""Return the full metric key string."""
|
|
56
|
+
if self.identifier:
|
|
57
|
+
return f"{self.component}.{self.metric}.{self.identifier}"
|
|
58
|
+
return f"{self.component}.{self.metric}"
|
|
59
|
+
|
|
60
|
+
def matches_prefix(self, *, prefix: str) -> bool:
|
|
61
|
+
"""Check if this key starts with the given prefix."""
|
|
62
|
+
return str(self).startswith(prefix)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class MetricKeys:
|
|
66
|
+
"""
|
|
67
|
+
Factory for well-known metric keys.
|
|
68
|
+
|
|
69
|
+
Provides type-safe, documented access to all metric keys used in the system.
|
|
70
|
+
Each method returns a MetricKey instance with proper typing.
|
|
71
|
+
|
|
72
|
+
Categories:
|
|
73
|
+
- Ping/Pong: Connection health monitoring
|
|
74
|
+
- Cache: Cache performance metrics
|
|
75
|
+
- Handler: EventBus handler execution
|
|
76
|
+
- Service: Service method (@inspector) metrics
|
|
77
|
+
- Circuit: Circuit breaker state and counters
|
|
78
|
+
- Client: Client health status
|
|
79
|
+
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
# -------------------------------------------------------------------------
|
|
83
|
+
# Ping/Pong Metrics
|
|
84
|
+
# -------------------------------------------------------------------------
|
|
85
|
+
|
|
86
|
+
@staticmethod
|
|
87
|
+
def cache_eviction(*, cache_name: str = "data") -> MetricKey:
|
|
88
|
+
"""
|
|
89
|
+
Cache eviction counter.
|
|
90
|
+
|
|
91
|
+
Incremented when an entry is evicted from the cache.
|
|
92
|
+
"""
|
|
93
|
+
return MetricKey("cache", cache_name, "eviction")
|
|
94
|
+
|
|
95
|
+
@staticmethod
|
|
96
|
+
def cache_hit(*, cache_name: str = "data") -> MetricKey:
|
|
97
|
+
"""
|
|
98
|
+
Cache hit counter.
|
|
99
|
+
|
|
100
|
+
Incremented when a cache lookup succeeds.
|
|
101
|
+
"""
|
|
102
|
+
return MetricKey("cache", cache_name, "hit")
|
|
103
|
+
|
|
104
|
+
@staticmethod
|
|
105
|
+
def cache_miss(*, cache_name: str = "data") -> MetricKey:
|
|
106
|
+
"""
|
|
107
|
+
Cache miss counter.
|
|
108
|
+
|
|
109
|
+
Incremented when a cache lookup fails.
|
|
110
|
+
"""
|
|
111
|
+
return MetricKey("cache", cache_name, "miss")
|
|
112
|
+
|
|
113
|
+
@staticmethod
|
|
114
|
+
def cache_size(*, cache_name: str = "data") -> MetricKey:
|
|
115
|
+
"""
|
|
116
|
+
Cache size gauge.
|
|
117
|
+
|
|
118
|
+
Current number of entries in the cache.
|
|
119
|
+
"""
|
|
120
|
+
return MetricKey("cache", cache_name, "size")
|
|
121
|
+
|
|
122
|
+
@staticmethod
|
|
123
|
+
def circuit_failure(*, interface_id: str) -> MetricKey:
|
|
124
|
+
"""
|
|
125
|
+
Circuit breaker failure counter.
|
|
126
|
+
|
|
127
|
+
Incremented when a request fails and is recorded by the circuit breaker.
|
|
128
|
+
"""
|
|
129
|
+
return MetricKey("circuit", "failure", interface_id)
|
|
130
|
+
|
|
131
|
+
@staticmethod
|
|
132
|
+
def circuit_rejection(*, interface_id: str) -> MetricKey:
|
|
133
|
+
"""
|
|
134
|
+
Circuit breaker rejection counter.
|
|
135
|
+
|
|
136
|
+
Incremented when a request is rejected because the circuit is open.
|
|
137
|
+
"""
|
|
138
|
+
return MetricKey("circuit", "rejection", interface_id)
|
|
139
|
+
|
|
140
|
+
@staticmethod
|
|
141
|
+
def circuit_state(*, interface_id: str) -> MetricKey:
|
|
142
|
+
"""
|
|
143
|
+
Circuit breaker state gauge.
|
|
144
|
+
|
|
145
|
+
Current state: 0=closed, 1=open, 2=half-open.
|
|
146
|
+
"""
|
|
147
|
+
return MetricKey("circuit", "state", interface_id)
|
|
148
|
+
|
|
149
|
+
@staticmethod
|
|
150
|
+
def circuit_state_transition(*, interface_id: str) -> MetricKey:
|
|
151
|
+
"""
|
|
152
|
+
Circuit breaker state transition counter.
|
|
153
|
+
|
|
154
|
+
Incremented when the circuit breaker changes state.
|
|
155
|
+
"""
|
|
156
|
+
return MetricKey("circuit", "state_transition", interface_id)
|
|
157
|
+
|
|
158
|
+
@staticmethod
|
|
159
|
+
def client_health(*, interface_id: str) -> MetricKey:
|
|
160
|
+
"""
|
|
161
|
+
Client health status.
|
|
162
|
+
|
|
163
|
+
Indicates whether the client connection is healthy.
|
|
164
|
+
"""
|
|
165
|
+
return MetricKey("client", "health", interface_id)
|
|
166
|
+
|
|
167
|
+
@staticmethod
|
|
168
|
+
def coalescer_coalesced(*, interface_id: str) -> MetricKey:
|
|
169
|
+
"""
|
|
170
|
+
Coalescer coalesced request counter.
|
|
171
|
+
|
|
172
|
+
Incremented when a request is coalesced (avoided execution).
|
|
173
|
+
"""
|
|
174
|
+
return MetricKey("coalescer", "coalesced", interface_id)
|
|
175
|
+
|
|
176
|
+
@staticmethod
|
|
177
|
+
def coalescer_failure(*, interface_id: str) -> MetricKey:
|
|
178
|
+
"""
|
|
179
|
+
Coalescer failed request counter.
|
|
180
|
+
|
|
181
|
+
Incremented when a request fails.
|
|
182
|
+
"""
|
|
183
|
+
return MetricKey("coalescer", "failure", interface_id)
|
|
184
|
+
|
|
185
|
+
@staticmethod
|
|
186
|
+
def handler_error(*, event_type: str) -> MetricKey:
|
|
187
|
+
"""
|
|
188
|
+
Return metric key for handler error counter.
|
|
189
|
+
|
|
190
|
+
Incremented when an event handler raises an exception.
|
|
191
|
+
"""
|
|
192
|
+
return MetricKey("handler", "error", event_type)
|
|
193
|
+
|
|
194
|
+
@staticmethod
|
|
195
|
+
def handler_execution(*, event_type: str) -> MetricKey:
|
|
196
|
+
"""
|
|
197
|
+
Return metric key for handler execution latency.
|
|
198
|
+
|
|
199
|
+
Tracks how long event handlers take to execute.
|
|
200
|
+
"""
|
|
201
|
+
return MetricKey("handler", "execution", event_type)
|
|
202
|
+
|
|
203
|
+
@staticmethod
|
|
204
|
+
def ping_pong_rtt(*, interface_id: str) -> MetricKey:
|
|
205
|
+
"""
|
|
206
|
+
RTT latency for ping/pong health checks.
|
|
207
|
+
|
|
208
|
+
Tracks the round-trip time for ping/pong messages per interface.
|
|
209
|
+
"""
|
|
210
|
+
return MetricKey("ping_pong", "rtt", interface_id)
|
|
211
|
+
|
|
212
|
+
@staticmethod
|
|
213
|
+
def rpc_server_active_tasks() -> MetricKey:
|
|
214
|
+
"""
|
|
215
|
+
RPC server active background tasks gauge.
|
|
216
|
+
|
|
217
|
+
Current number of background tasks being processed.
|
|
218
|
+
"""
|
|
219
|
+
return MetricKey("rpc_server", "active_tasks")
|
|
220
|
+
|
|
221
|
+
@staticmethod
|
|
222
|
+
def rpc_server_error() -> MetricKey:
|
|
223
|
+
"""
|
|
224
|
+
RPC server error counter.
|
|
225
|
+
|
|
226
|
+
Incremented when request handling fails.
|
|
227
|
+
"""
|
|
228
|
+
return MetricKey("rpc_server", "error")
|
|
229
|
+
|
|
230
|
+
@staticmethod
|
|
231
|
+
def rpc_server_request() -> MetricKey:
|
|
232
|
+
"""
|
|
233
|
+
RPC server request counter.
|
|
234
|
+
|
|
235
|
+
Incremented for each incoming request.
|
|
236
|
+
"""
|
|
237
|
+
return MetricKey("rpc_server", "request")
|
|
238
|
+
|
|
239
|
+
@staticmethod
|
|
240
|
+
def rpc_server_request_latency() -> MetricKey:
|
|
241
|
+
"""
|
|
242
|
+
RPC server request handling latency.
|
|
243
|
+
|
|
244
|
+
Tracks how long request handling takes.
|
|
245
|
+
"""
|
|
246
|
+
return MetricKey("rpc_server", "latency")
|
|
247
|
+
|
|
248
|
+
@staticmethod
|
|
249
|
+
def self_healing_recovery(*, interface_id: str) -> MetricKey:
|
|
250
|
+
"""
|
|
251
|
+
Self-healing recovery counter.
|
|
252
|
+
|
|
253
|
+
Incremented when recovery is initiated after circuit breaker closes.
|
|
254
|
+
"""
|
|
255
|
+
return MetricKey("self_healing", "recovery", interface_id)
|
|
256
|
+
|
|
257
|
+
@staticmethod
|
|
258
|
+
def self_healing_refresh_failure(*, interface_id: str) -> MetricKey:
|
|
259
|
+
"""
|
|
260
|
+
Self-healing data refresh failure counter.
|
|
261
|
+
|
|
262
|
+
Incremented when data refresh fails after recovery.
|
|
263
|
+
"""
|
|
264
|
+
return MetricKey("self_healing", "refresh_failure", interface_id)
|
|
265
|
+
|
|
266
|
+
@staticmethod
|
|
267
|
+
def self_healing_refresh_success(*, interface_id: str) -> MetricKey:
|
|
268
|
+
"""
|
|
269
|
+
Self-healing data refresh success counter.
|
|
270
|
+
|
|
271
|
+
Incremented when data refresh succeeds after recovery.
|
|
272
|
+
"""
|
|
273
|
+
return MetricKey("self_healing", "refresh_success", interface_id)
|
|
274
|
+
|
|
275
|
+
@staticmethod
|
|
276
|
+
def self_healing_trip(*, interface_id: str) -> MetricKey:
|
|
277
|
+
"""
|
|
278
|
+
Self-healing trip counter.
|
|
279
|
+
|
|
280
|
+
Incremented when a circuit breaker trip is logged.
|
|
281
|
+
"""
|
|
282
|
+
return MetricKey("self_healing", "trip", interface_id)
|
|
283
|
+
|
|
284
|
+
@staticmethod
|
|
285
|
+
def service_call(*, method: str) -> MetricKey:
|
|
286
|
+
"""
|
|
287
|
+
Service method call latency.
|
|
288
|
+
|
|
289
|
+
Tracks execution time of methods decorated with @inspector.
|
|
290
|
+
"""
|
|
291
|
+
return MetricKey("service", "call", method)
|
|
292
|
+
|
|
293
|
+
@staticmethod
|
|
294
|
+
def service_error(*, method: str) -> MetricKey:
|
|
295
|
+
"""
|
|
296
|
+
Service method error counter.
|
|
297
|
+
|
|
298
|
+
Incremented when a service method raises an exception.
|
|
299
|
+
"""
|
|
300
|
+
return MetricKey("service", "error", method)
|