sentry-arroyo 2.28.1__py3-none-any.whl → 2.28.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.
@@ -1,7 +1,9 @@
1
1
  import logging
2
2
  import time
3
3
  from collections import deque
4
- from typing import Deque, Optional, Tuple, Union
4
+ from typing import Deque, Optional, Tuple, Union, cast
5
+
6
+ from confluent_kafka import KafkaError, KafkaException
5
7
 
6
8
  from arroyo.backends.abstract import Producer, ProducerFuture
7
9
  from arroyo.processing.strategies.abstract import MessageRejected, ProcessingStrategy
@@ -78,6 +80,15 @@ class Produce(ProcessingStrategy[Union[FilteredPayload, TStrategyPayload]]):
78
80
  self.__metrics.increment(
79
81
  "arroyo.producer.produce_status", tags={"status": "success"}
80
82
  )
83
+ except KafkaException as e:
84
+ self.__metrics.increment(
85
+ "arroyo.producer.produce_status",
86
+ tags={
87
+ "status": "error",
88
+ "code": str(cast(KafkaError, e.args[0]).code),
89
+ },
90
+ )
91
+ raise e
81
92
  except Exception as e:
82
93
  self.__metrics.increment(
83
94
  "arroyo.producer.produce_status", tags={"status": "error"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sentry-arroyo
3
- Version: 2.28.1
3
+ Version: 2.28.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
@@ -26,7 +26,7 @@ arroyo/processing/strategies/filter.py,sha256=dzx9BaIVigxFGfsrNYAWJYTDCanIp3RiV9
26
26
  arroyo/processing/strategies/guard.py,sha256=W2Nsy8LW6RWYPh-_ReljR8_lkPgipOG8LhtDR-DDlto,4878
27
27
  arroyo/processing/strategies/healthcheck.py,sha256=fEVB516nZVZWvZLzi4_ImaE6F7QQQJIymW6HgiUYUSA,1775
28
28
  arroyo/processing/strategies/noop.py,sha256=BtWkC93QpZCKAB4qTsXLaqrYsllE1Olp6mY2YeuK9ag,726
29
- arroyo/processing/strategies/produce.py,sha256=7ZbKB0tT8AcUXhACSeuVXAS-rgCTJKfUuWBQfZIkawM,5126
29
+ arroyo/processing/strategies/produce.py,sha256=w4GI7KC-CGn2bLG_qPcuKJo0EbZ4PF2TJ4iQaytRXP0,5566
30
30
  arroyo/processing/strategies/reduce.py,sha256=xv9bYisgHHyS8fVD1PdGi4TJsaK-4RAhMEDh4WHhYfI,3933
31
31
  arroyo/processing/strategies/run_task.py,sha256=MGe2UcIWN7FkPc9plKzRVUNbZ7Sk0jWjw1z2vVOFI_I,2160
32
32
  arroyo/processing/strategies/run_task_in_threads.py,sha256=f1sb2AG-BLz11X78jfhtERIkdFogrV8vtdT3pyJdkx0,6144
@@ -46,7 +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.28.1.dist-info/licenses/LICENSE,sha256=0Ng3MFdEcnz0sVD1XvGBBzbavvNp_7OAM5yVObB46jU,10829
49
+ sentry_arroyo-2.28.2.dist-info/licenses/LICENSE,sha256=0Ng3MFdEcnz0sVD1XvGBBzbavvNp_7OAM5yVObB46jU,10829
50
50
  tests/backends/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  tests/backends/mixins.py,sha256=sfNyE0VTeiD3GHOnBYl-9urvPuURI2G1BWke0cz7Dvc,20445
52
52
  tests/backends/test_commit.py,sha256=iTHfK1qsBxim0XwxgMvNNSMqDUMEHoYkYBDcgxGBFbs,831
@@ -73,7 +73,7 @@ tests/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
73
  tests/utils/test_concurrent.py,sha256=Gwdzym2UZ1HO3rhOSGmzxImWcLFygY8P7MXHT3Q0xTE,455
74
74
  tests/utils/test_metrics.py,sha256=bI0EtGgPokMQyEqX58i0-8zvLfxRP2nWaWr2wLMaJ_o,917
75
75
  tests/utils/test_retries.py,sha256=AxJLkXWeL9AjHv_p1n0pe8CXXJp24ZQIuYBHfNcmiz4,3075
76
- sentry_arroyo-2.28.1.dist-info/METADATA,sha256=lPU0XakUT5M-iyiJeHw1wBAyt3iVOiYpJEHG0ETqlpc,2208
77
- sentry_arroyo-2.28.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
78
- sentry_arroyo-2.28.1.dist-info/top_level.txt,sha256=DVdMZKysL_iIxm5aY0sYgZtP5ZXMg9YBaBmGQHVmDXA,22
79
- sentry_arroyo-2.28.1.dist-info/RECORD,,
76
+ sentry_arroyo-2.28.2.dist-info/METADATA,sha256=O3gEbDcjSNhCM7wJWYQwqQFdAIRnXQ2DQ8D9tH1waTw,2208
77
+ sentry_arroyo-2.28.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
78
+ sentry_arroyo-2.28.2.dist-info/top_level.txt,sha256=DVdMZKysL_iIxm5aY0sYgZtP5ZXMg9YBaBmGQHVmDXA,22
79
+ sentry_arroyo-2.28.2.dist-info/RECORD,,