sentry-arroyo 2.20.0__py3-none-any.whl → 2.20.2__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.
arroyo/dlq.py CHANGED
@@ -290,9 +290,15 @@ class BufferedMessages(Generic[TStrategyPayload]):
290
290
  ] = defaultdict(deque)
291
291
  self.__metrics = get_metrics()
292
292
 
293
- def report_partition_metrics(self, buffered: Deque[BrokerValue[TStrategyPayload]]) -> None:
293
+ def report_partition_metrics(
294
+ self, buffered: Deque[BrokerValue[TStrategyPayload]], partition_index: int
295
+ ) -> None:
294
296
 
295
- self.__metrics.gauge("arroyo.consumer.dlq_buffer.len", len(buffered))
297
+ self.__metrics.gauge(
298
+ "arroyo.consumer.dlq_buffer.len",
299
+ len(buffered),
300
+ tags={"partition_index": str(partition_index)},
301
+ )
296
302
 
297
303
  def append(self, message: BrokerValue[TStrategyPayload]) -> None:
298
304
  """
@@ -310,7 +316,9 @@ class BufferedMessages(Generic[TStrategyPayload]):
310
316
  buffered.popleft()
311
317
 
312
318
  self.__buffered_messages[message.partition].append(message)
313
- self.report_partition_metrics(self.__buffered_messages[message.partition])
319
+ self.report_partition_metrics(
320
+ self.__buffered_messages[message.partition], message.partition.index
321
+ )
314
322
 
315
323
  def pop(
316
324
  self, partition: Partition, offset: int
@@ -325,13 +333,13 @@ class BufferedMessages(Generic[TStrategyPayload]):
325
333
  while buffered:
326
334
  if buffered[0].offset == offset:
327
335
  msg = buffered.popleft()
328
- self.report_partition_metrics(buffered)
336
+ self.report_partition_metrics(buffered, partition.index)
329
337
  return msg
330
338
  if buffered[0].offset > offset:
331
- self.report_partition_metrics(buffered)
339
+ self.report_partition_metrics(buffered, partition.index)
332
340
  break
333
341
 
334
- self.report_partition_metrics(buffered)
342
+ self.report_partition_metrics(buffered, partition.index)
335
343
  self.__buffered_messages[partition].popleft()
336
344
 
337
345
  return None
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: sentry-arroyo
3
- Version: 2.20.0
3
+ Version: 2.20.2
4
4
  Summary: Arroyo is a Python library for working with streaming data.
5
5
  Home-page: https://github.com/getsentry/arroyo
6
6
  Author: Sentry
@@ -21,6 +21,7 @@ Dynamic: description
21
21
  Dynamic: description-content-type
22
22
  Dynamic: home-page
23
23
  Dynamic: license
24
+ Dynamic: license-file
24
25
  Dynamic: requires-dist
25
26
  Dynamic: summary
26
27
 
@@ -1,6 +1,6 @@
1
1
  arroyo/__init__.py,sha256=fcpHZd2P3MxWl6PJJ8n__fM_NRIfiUE8tKN-orv6lb0,187
2
2
  arroyo/commit.py,sha256=oFihWUW8fLsjomWh0o085qIHe9vwVNgoOJC6JQdFM7M,2235
3
- arroyo/dlq.py,sha256=xG59xdadezRcQQjy0ocgK5kpaZefENFXaaIK8kyspqw,16212
3
+ arroyo/dlq.py,sha256=k7v-lK6XUhX2e3gpa-lEHIZUNw3sxaI6EhMOAhjDn0U,16441
4
4
  arroyo/errors.py,sha256=IbtoIbz_m5QrxNRBLOxiy-hOfJQTEwNPCyq6yqedJYk,1059
5
5
  arroyo/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  arroyo/types.py,sha256=sLY0x030np4UmbaW5C1KH1se7Z2pjQiPvAe5x2sXf7A,5684
@@ -46,6 +46,7 @@ examples/transform_and_produce/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
46
46
  examples/transform_and_produce/batched.py,sha256=st2R6qTneAtV0JFbKP30Ti3sJDYj8Jkbmta9JckKdZU,2636
47
47
  examples/transform_and_produce/script.py,sha256=8kSMIjQNqGYEVyE0PvrfJh-a_UYCrJSstTp_De7kyyg,2306
48
48
  examples/transform_and_produce/simple.py,sha256=H7xqxItjl4tx34wVW5dy6mB9G39QucAtxkJSBzVmjgA,1637
49
+ sentry_arroyo-2.20.2.dist-info/licenses/LICENSE,sha256=0Ng3MFdEcnz0sVD1XvGBBzbavvNp_7OAM5yVObB46jU,10829
49
50
  tests/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
51
  tests/backends/mixins.py,sha256=sfNyE0VTeiD3GHOnBYl-9urvPuURI2G1BWke0cz7Dvc,20445
51
52
  tests/backends/test_commit.py,sha256=iTHfK1qsBxim0XwxgMvNNSMqDUMEHoYkYBDcgxGBFbs,831
@@ -71,8 +72,7 @@ tests/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
72
  tests/utils/test_concurrent.py,sha256=Gwdzym2UZ1HO3rhOSGmzxImWcLFygY8P7MXHT3Q0xTE,455
72
73
  tests/utils/test_metrics.py,sha256=bI0EtGgPokMQyEqX58i0-8zvLfxRP2nWaWr2wLMaJ_o,917
73
74
  tests/utils/test_retries.py,sha256=AxJLkXWeL9AjHv_p1n0pe8CXXJp24ZQIuYBHfNcmiz4,3075
74
- sentry_arroyo-2.20.0.dist-info/LICENSE,sha256=0Ng3MFdEcnz0sVD1XvGBBzbavvNp_7OAM5yVObB46jU,10829
75
- sentry_arroyo-2.20.0.dist-info/METADATA,sha256=3gLtABSUjjIShAA260wFKnzvargcr3MYdsViXQiICYI,2178
76
- sentry_arroyo-2.20.0.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
77
- sentry_arroyo-2.20.0.dist-info/top_level.txt,sha256=DVdMZKysL_iIxm5aY0sYgZtP5ZXMg9YBaBmGQHVmDXA,22
78
- sentry_arroyo-2.20.0.dist-info/RECORD,,
75
+ sentry_arroyo-2.20.2.dist-info/METADATA,sha256=KO6b8r6S4dFbuUmJBbvEOCiS9fRUJShyCPucA3KNPGs,2200
76
+ sentry_arroyo-2.20.2.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
77
+ sentry_arroyo-2.20.2.dist-info/top_level.txt,sha256=DVdMZKysL_iIxm5aY0sYgZtP5ZXMg9YBaBmGQHVmDXA,22
78
+ sentry_arroyo-2.20.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.1.0)
2
+ Generator: setuptools (77.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5