tigrcorn-observability 0.3.18.dev1__tar.gz → 0.3.18.dev3__tar.gz

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.
Files changed (18) hide show
  1. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/PKG-INFO +4 -4
  2. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/README.md +1 -1
  3. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/pyproject.toml +3 -3
  4. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability/metrics.py +91 -1
  5. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability.egg-info/PKG-INFO +4 -4
  6. tigrcorn_observability-0.3.18.dev3/src/tigrcorn_observability.egg-info/requires.txt +2 -0
  7. tigrcorn_observability-0.3.18.dev1/src/tigrcorn_observability.egg-info/requires.txt +0 -2
  8. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/LICENSE +0 -0
  9. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/setup.cfg +0 -0
  10. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability/__init__.py +0 -0
  11. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability/events.py +0 -0
  12. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability/logging.py +0 -0
  13. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability/protocol.py +0 -0
  14. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability/py.typed +0 -0
  15. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability/tracing.py +0 -0
  16. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability.egg-info/SOURCES.txt +0 -0
  17. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability.egg-info/dependency_links.txt +0 -0
  18. {tigrcorn_observability-0.3.18.dev1 → tigrcorn_observability-0.3.18.dev3}/src/tigrcorn_observability.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tigrcorn-observability
3
- Version: 0.3.18.dev1
3
+ Version: 0.3.18.dev3
4
4
  Summary: Logging, metrics, tracing, DoS warning events, and release-evidence metadata for the Tigrcorn Python web server.
5
5
  Author-email: Jacob Stewart <jacob@swarmauri.com>
6
6
  License: Apache License
@@ -186,8 +186,8 @@ Classifier: Typing :: Typed
186
186
  Requires-Python: <3.15,>=3.10
187
187
  Description-Content-Type: text/markdown
188
188
  License-File: LICENSE
189
- Requires-Dist: tigrcorn-core==0.3.18.dev1
190
- Requires-Dist: tigrcorn-config==0.3.18.dev1
189
+ Requires-Dist: tigrcorn-core==0.3.18.dev3
190
+ Requires-Dist: tigrcorn-config==0.3.18.dev3
191
191
  Dynamic: license-file
192
192
 
193
193
  <div align="center">
@@ -277,7 +277,7 @@ The package exposes its supported public surface through the <code>tigrcorn_obse
277
277
 
278
278
  ## Package Graph
279
279
 
280
- [tigrcorn-core](https://pypi.org/project/tigrcorn-core/) | [tigrcorn-config](https://pypi.org/project/tigrcorn-config/) | [tigrcorn-http](https://pypi.org/project/tigrcorn-http/) | [tigrcorn-asgi](https://pypi.org/project/tigrcorn-asgi/) | [tigrcorn-contract](https://pypi.org/project/tigrcorn-contract/) | [tigrcorn-transports](https://pypi.org/project/tigrcorn-transports/) | [tigrcorn-security](https://pypi.org/project/tigrcorn-security/) | [tigrcorn-protocols](https://pypi.org/project/tigrcorn-protocols/) | [tigrcorn-static](https://pypi.org/project/tigrcorn-static/) | [tigrcorn-observability](https://pypi.org/project/tigrcorn-observability/) | [tigrcorn-runtime](https://pypi.org/project/tigrcorn-runtime/) | [tigrcorn-compat](https://pypi.org/project/tigrcorn-compat/) | [tigrcorn-certification](https://pypi.org/project/tigrcorn-certification/)
280
+ [tigrcorn-core](https://pypi.org/project/tigrcorn-core/) | [tigrcorn-quic-cc](https://pypi.org/project/tigrcorn-quic-cc/) | [tigrcorn-quic-cc-reno](https://pypi.org/project/tigrcorn-quic-cc-reno/) | [tigrcorn-config](https://pypi.org/project/tigrcorn-config/) | [tigrcorn-http](https://pypi.org/project/tigrcorn-http/) | [tigrcorn-asgi](https://pypi.org/project/tigrcorn-asgi/) | [tigrcorn-contract](https://pypi.org/project/tigrcorn-contract/) | [tigrcorn-transports](https://pypi.org/project/tigrcorn-transports/) | [tigrcorn-security](https://pypi.org/project/tigrcorn-security/) | [tigrcorn-protocols](https://pypi.org/project/tigrcorn-protocols/) | [tigrcorn-static](https://pypi.org/project/tigrcorn-static/) | [tigrcorn-observability](https://pypi.org/project/tigrcorn-observability/) | [tigrcorn-runtime](https://pypi.org/project/tigrcorn-runtime/) | [tigrcorn-compat](https://pypi.org/project/tigrcorn-compat/) | [tigrcorn-certification](https://pypi.org/project/tigrcorn-certification/)
281
281
 
282
282
  ## Best Practices
283
283
 
@@ -85,7 +85,7 @@ The package exposes its supported public surface through the <code>tigrcorn_obse
85
85
 
86
86
  ## Package Graph
87
87
 
88
- [tigrcorn-core](https://pypi.org/project/tigrcorn-core/) | [tigrcorn-config](https://pypi.org/project/tigrcorn-config/) | [tigrcorn-http](https://pypi.org/project/tigrcorn-http/) | [tigrcorn-asgi](https://pypi.org/project/tigrcorn-asgi/) | [tigrcorn-contract](https://pypi.org/project/tigrcorn-contract/) | [tigrcorn-transports](https://pypi.org/project/tigrcorn-transports/) | [tigrcorn-security](https://pypi.org/project/tigrcorn-security/) | [tigrcorn-protocols](https://pypi.org/project/tigrcorn-protocols/) | [tigrcorn-static](https://pypi.org/project/tigrcorn-static/) | [tigrcorn-observability](https://pypi.org/project/tigrcorn-observability/) | [tigrcorn-runtime](https://pypi.org/project/tigrcorn-runtime/) | [tigrcorn-compat](https://pypi.org/project/tigrcorn-compat/) | [tigrcorn-certification](https://pypi.org/project/tigrcorn-certification/)
88
+ [tigrcorn-core](https://pypi.org/project/tigrcorn-core/) | [tigrcorn-quic-cc](https://pypi.org/project/tigrcorn-quic-cc/) | [tigrcorn-quic-cc-reno](https://pypi.org/project/tigrcorn-quic-cc-reno/) | [tigrcorn-config](https://pypi.org/project/tigrcorn-config/) | [tigrcorn-http](https://pypi.org/project/tigrcorn-http/) | [tigrcorn-asgi](https://pypi.org/project/tigrcorn-asgi/) | [tigrcorn-contract](https://pypi.org/project/tigrcorn-contract/) | [tigrcorn-transports](https://pypi.org/project/tigrcorn-transports/) | [tigrcorn-security](https://pypi.org/project/tigrcorn-security/) | [tigrcorn-protocols](https://pypi.org/project/tigrcorn-protocols/) | [tigrcorn-static](https://pypi.org/project/tigrcorn-static/) | [tigrcorn-observability](https://pypi.org/project/tigrcorn-observability/) | [tigrcorn-runtime](https://pypi.org/project/tigrcorn-runtime/) | [tigrcorn-compat](https://pypi.org/project/tigrcorn-compat/) | [tigrcorn-certification](https://pypi.org/project/tigrcorn-certification/)
89
89
 
90
90
  ## Best Practices
91
91
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tigrcorn-observability"
7
- version = "0.3.18.dev1"
7
+ version = "0.3.18.dev3"
8
8
  description = "Logging, metrics, tracing, DoS warning events, and release-evidence metadata for the Tigrcorn Python web server."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10,<3.15"
@@ -29,8 +29,8 @@ classifiers = [
29
29
  "Typing :: Typed",
30
30
  ]
31
31
  dependencies = [
32
- "tigrcorn-core==0.3.18.dev1",
33
- "tigrcorn-config==0.3.18.dev1",
32
+ "tigrcorn-core==0.3.18.dev3",
33
+ "tigrcorn-config==0.3.18.dev3",
34
34
  ]
35
35
 
36
36
  [tool.setuptools]
@@ -47,11 +47,27 @@ class Metrics:
47
47
  quic_path_migrations: int = 0
48
48
  quic_packets_lost: int = 0
49
49
  quic_pto_expirations: int = 0
50
+ quic_pto_probes: int = 0
51
+ quic_stream_bytes_retransmitted: int = 0
52
+ quic_crypto_bytes_retransmitted: int = 0
53
+ quic_datagram_frames_abandoned: int = 0
54
+ quic_frames_regenerated: int = 0
55
+ quic_bytes_in_flight: int = 0
56
+ quic_congestion_window_bytes: int = 0
57
+ quic_smoothed_rtt_seconds: float = 0.0
58
+ quic_pacing_rate_bytes_per_second: float = 0.0
59
+ quic_pending_outbound_datagrams: int = 0
60
+ quic_congestion_controller_failures: int = 0
61
+ quic_persistent_congestion_events: int = 0
50
62
  http3_requests_served: int = 0
51
63
  http3_stream_resets: int = 0
52
64
  http3_goaway_received: int = 0
53
65
  http3_qpack_encoder_streams: int = 0
54
66
  http3_qpack_decoder_streams: int = 0
67
+ webtransport_profile_draft02_selected: int = 0
68
+ webtransport_profile_draft13_selected: int = 0
69
+ webtransport_profile_ietf_current_selected: int = 0
70
+ webtransport_negotiation_rejected: int = 0
55
71
 
56
72
  def connection_opened(self) -> None:
57
73
  self.connections_opened += 1
@@ -128,6 +144,42 @@ class Metrics:
128
144
  def quic_pto_expired(self) -> None:
129
145
  self.quic_pto_expirations += 1
130
146
 
147
+ def quic_recovery_observed(
148
+ self,
149
+ *,
150
+ pto_probes: int = 0,
151
+ stream_bytes_retransmitted: int = 0,
152
+ crypto_bytes_retransmitted: int = 0,
153
+ datagram_frames_abandoned: int = 0,
154
+ frames_regenerated: int = 0,
155
+ ) -> None:
156
+ self.quic_pto_probes += max(0, int(pto_probes))
157
+ self.quic_stream_bytes_retransmitted += max(0, int(stream_bytes_retransmitted))
158
+ self.quic_crypto_bytes_retransmitted += max(0, int(crypto_bytes_retransmitted))
159
+ self.quic_datagram_frames_abandoned += max(0, int(datagram_frames_abandoned))
160
+ self.quic_frames_regenerated += max(0, int(frames_regenerated))
161
+
162
+ def quic_transport_state_observed(
163
+ self,
164
+ *,
165
+ bytes_in_flight: int,
166
+ congestion_window: int,
167
+ smoothed_rtt: float,
168
+ pacing_rate: float,
169
+ pending_outbound: int,
170
+ ) -> None:
171
+ self.quic_bytes_in_flight = max(0, int(bytes_in_flight))
172
+ self.quic_congestion_window_bytes = max(0, int(congestion_window))
173
+ self.quic_smoothed_rtt_seconds = max(0.0, float(smoothed_rtt))
174
+ self.quic_pacing_rate_bytes_per_second = max(0.0, float(pacing_rate))
175
+ self.quic_pending_outbound_datagrams = max(0, int(pending_outbound))
176
+
177
+ def quic_congestion_controller_failed(self) -> None:
178
+ self.quic_congestion_controller_failures += 1
179
+
180
+ def quic_persistent_congestion_observed(self) -> None:
181
+ self.quic_persistent_congestion_events += 1
182
+
131
183
  def http3_request_served(self) -> None:
132
184
  self.http3_requests_served += 1
133
185
 
@@ -143,6 +195,18 @@ class Metrics:
143
195
  def http3_qpack_decoder_stream_opened(self) -> None:
144
196
  self.http3_qpack_decoder_streams += 1
145
197
 
198
+ def webtransport_profile_selected(self, profile: str) -> None:
199
+ field_name = {
200
+ 'draft02': 'webtransport_profile_draft02_selected',
201
+ 'draft13': 'webtransport_profile_draft13_selected',
202
+ 'ietf-current': 'webtransport_profile_ietf_current_selected',
203
+ }.get(profile)
204
+ if field_name is not None:
205
+ setattr(self, field_name, int(getattr(self, field_name)) + 1)
206
+
207
+ def webtransport_negotiation_rejected_observed(self) -> None:
208
+ self.webtransport_negotiation_rejected += 1
209
+
146
210
  @property
147
211
  def uptime_seconds(self) -> float:
148
212
  return max(0.0, monotonic() - self.started_at)
@@ -182,11 +246,27 @@ class Metrics:
182
246
  'quic_path_migrations': self.quic_path_migrations,
183
247
  'quic_packets_lost': self.quic_packets_lost,
184
248
  'quic_pto_expirations': self.quic_pto_expirations,
249
+ 'quic_pto_probes': self.quic_pto_probes,
250
+ 'quic_stream_bytes_retransmitted': self.quic_stream_bytes_retransmitted,
251
+ 'quic_crypto_bytes_retransmitted': self.quic_crypto_bytes_retransmitted,
252
+ 'quic_datagram_frames_abandoned': self.quic_datagram_frames_abandoned,
253
+ 'quic_frames_regenerated': self.quic_frames_regenerated,
254
+ 'quic_bytes_in_flight': self.quic_bytes_in_flight,
255
+ 'quic_congestion_window_bytes': self.quic_congestion_window_bytes,
256
+ 'quic_smoothed_rtt_seconds': self.quic_smoothed_rtt_seconds,
257
+ 'quic_pacing_rate_bytes_per_second': self.quic_pacing_rate_bytes_per_second,
258
+ 'quic_pending_outbound_datagrams': self.quic_pending_outbound_datagrams,
259
+ 'quic_congestion_controller_failures': self.quic_congestion_controller_failures,
260
+ 'quic_persistent_congestion_events': self.quic_persistent_congestion_events,
185
261
  'http3_requests_served': self.http3_requests_served,
186
262
  'http3_stream_resets': self.http3_stream_resets,
187
263
  'http3_goaway_received': self.http3_goaway_received,
188
264
  'http3_qpack_encoder_streams': self.http3_qpack_encoder_streams,
189
265
  'http3_qpack_decoder_streams': self.http3_qpack_decoder_streams,
266
+ 'webtransport_profile_draft02_selected': self.webtransport_profile_draft02_selected,
267
+ 'webtransport_profile_draft13_selected': self.webtransport_profile_draft13_selected,
268
+ 'webtransport_profile_ietf_current_selected': self.webtransport_profile_ietf_current_selected,
269
+ 'webtransport_negotiation_rejected': self.webtransport_negotiation_rejected,
190
270
  }
191
271
 
192
272
  def render_prometheus(self, *, prefix: str = 'tigrcorn') -> str:
@@ -203,7 +283,17 @@ class Metrics:
203
283
 
204
284
 
205
285
  def _is_gauge_metric(name: str) -> bool:
206
- return name.startswith('active_') or name == 'uptime_seconds'
286
+ return (
287
+ name.startswith('active_')
288
+ or name == 'uptime_seconds'
289
+ or name in {
290
+ 'quic_bytes_in_flight',
291
+ 'quic_congestion_window_bytes',
292
+ 'quic_smoothed_rtt_seconds',
293
+ 'quic_pacing_rate_bytes_per_second',
294
+ 'quic_pending_outbound_datagrams',
295
+ }
296
+ )
207
297
 
208
298
 
209
299
  def iter_statsd_lines(snapshot: Mapping[str, Any], *, previous: Mapping[str, Any] | None = None, prefix: str = 'tigrcorn') -> list[str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tigrcorn-observability
3
- Version: 0.3.18.dev1
3
+ Version: 0.3.18.dev3
4
4
  Summary: Logging, metrics, tracing, DoS warning events, and release-evidence metadata for the Tigrcorn Python web server.
5
5
  Author-email: Jacob Stewart <jacob@swarmauri.com>
6
6
  License: Apache License
@@ -186,8 +186,8 @@ Classifier: Typing :: Typed
186
186
  Requires-Python: <3.15,>=3.10
187
187
  Description-Content-Type: text/markdown
188
188
  License-File: LICENSE
189
- Requires-Dist: tigrcorn-core==0.3.18.dev1
190
- Requires-Dist: tigrcorn-config==0.3.18.dev1
189
+ Requires-Dist: tigrcorn-core==0.3.18.dev3
190
+ Requires-Dist: tigrcorn-config==0.3.18.dev3
191
191
  Dynamic: license-file
192
192
 
193
193
  <div align="center">
@@ -277,7 +277,7 @@ The package exposes its supported public surface through the <code>tigrcorn_obse
277
277
 
278
278
  ## Package Graph
279
279
 
280
- [tigrcorn-core](https://pypi.org/project/tigrcorn-core/) | [tigrcorn-config](https://pypi.org/project/tigrcorn-config/) | [tigrcorn-http](https://pypi.org/project/tigrcorn-http/) | [tigrcorn-asgi](https://pypi.org/project/tigrcorn-asgi/) | [tigrcorn-contract](https://pypi.org/project/tigrcorn-contract/) | [tigrcorn-transports](https://pypi.org/project/tigrcorn-transports/) | [tigrcorn-security](https://pypi.org/project/tigrcorn-security/) | [tigrcorn-protocols](https://pypi.org/project/tigrcorn-protocols/) | [tigrcorn-static](https://pypi.org/project/tigrcorn-static/) | [tigrcorn-observability](https://pypi.org/project/tigrcorn-observability/) | [tigrcorn-runtime](https://pypi.org/project/tigrcorn-runtime/) | [tigrcorn-compat](https://pypi.org/project/tigrcorn-compat/) | [tigrcorn-certification](https://pypi.org/project/tigrcorn-certification/)
280
+ [tigrcorn-core](https://pypi.org/project/tigrcorn-core/) | [tigrcorn-quic-cc](https://pypi.org/project/tigrcorn-quic-cc/) | [tigrcorn-quic-cc-reno](https://pypi.org/project/tigrcorn-quic-cc-reno/) | [tigrcorn-config](https://pypi.org/project/tigrcorn-config/) | [tigrcorn-http](https://pypi.org/project/tigrcorn-http/) | [tigrcorn-asgi](https://pypi.org/project/tigrcorn-asgi/) | [tigrcorn-contract](https://pypi.org/project/tigrcorn-contract/) | [tigrcorn-transports](https://pypi.org/project/tigrcorn-transports/) | [tigrcorn-security](https://pypi.org/project/tigrcorn-security/) | [tigrcorn-protocols](https://pypi.org/project/tigrcorn-protocols/) | [tigrcorn-static](https://pypi.org/project/tigrcorn-static/) | [tigrcorn-observability](https://pypi.org/project/tigrcorn-observability/) | [tigrcorn-runtime](https://pypi.org/project/tigrcorn-runtime/) | [tigrcorn-compat](https://pypi.org/project/tigrcorn-compat/) | [tigrcorn-certification](https://pypi.org/project/tigrcorn-certification/)
281
281
 
282
282
  ## Best Practices
283
283
 
@@ -0,0 +1,2 @@
1
+ tigrcorn-core==0.3.18.dev3
2
+ tigrcorn-config==0.3.18.dev3
@@ -1,2 +0,0 @@
1
- tigrcorn-core==0.3.18.dev1
2
- tigrcorn-config==0.3.18.dev1