jararaca 0.3.21__py3-none-any.whl → 0.3.22__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.

Potentially problematic release.


This version of jararaca might be problematic. Click here for more details.

@@ -1528,6 +1528,7 @@ class MessageHandlerCallback:
1528
1528
  logger.exception(
1529
1529
  f"Error processing message {message_id} on topic {routing_key}: {str(base_exc)}"
1530
1530
  )
1531
+ raise
1531
1532
 
1532
1533
  # Handle rejection with retry logic
1533
1534
  if incoming_message_spec.requeue_on_exception:
@@ -1543,6 +1544,7 @@ class MessageHandlerCallback:
1543
1544
  await self.handle_reject_message(
1544
1545
  aio_pika_message, requeue=False, exception=base_exc
1545
1546
  )
1547
+
1546
1548
  else:
1547
1549
  # Message processed successfully, log and clean up any retry state
1548
1550
  message_id = aio_pika_message.message_id or str(uuid.uuid4())
@@ -75,23 +75,43 @@ class OtelTracingContextProviderFactory(TracingContextProviderFactory):
75
75
  title: str = "Unmapped App Context Execution"
76
76
  headers: dict[str, Any] = {}
77
77
  tx_data = app_tx_ctx.transaction_data
78
- extra_attributes: dict[str, Any] = {}
78
+ extra_attributes: dict[str, str] = {}
79
79
  if tx_data.context_type == "http":
80
80
 
81
81
  headers = dict(tx_data.request.headers)
82
82
  title = f"HTTP {tx_data.request.method} {tx_data.request.url}"
83
83
  extra_attributes = {
84
84
  "http.method": tx_data.request.method,
85
- "http.url": tx_data.request.url,
86
- "http.status_code": tx_data.response.status_code,
85
+ "http.url": str(tx_data.request.url),
86
+ "http.path": tx_data.request.url.path, # Path with the key applied to the template
87
+ "http.route.path": tx_data.request.scope["route"].path,
88
+ "http.route.endpoint.name": tx_data.request[
89
+ "route"
90
+ ].endpoint.__qualname__,
91
+ "http.query": tx_data.request.url.query,
92
+ **{
93
+ f"http.request.path_param.{k}": v
94
+ for k, v in tx_data.request.path_params.items()
95
+ },
96
+ **{
97
+ f"http.request.query_param.{k}": v
98
+ for k, v in tx_data.request.query_params.items()
99
+ },
100
+ **{
101
+ f"http.request.header.{k}": v
102
+ for k, v in tx_data.request.headers.items()
103
+ },
87
104
  }
88
105
 
89
106
  elif tx_data.context_type == "message_bus":
90
107
  title = f"Message Bus {tx_data.topic}"
91
108
  headers = use_implicit_headers() or {}
109
+ payload = tx_data.message.payload()
92
110
  extra_attributes = {
93
111
  "bus.topic": tx_data.topic,
94
- "bus.message": tx_data.message.payload().model_dump_json(),
112
+ "bus.message.body": payload.model_dump_json(),
113
+ "bus.message.name": payload.__class__.__qualname__,
114
+ "bus.message.module": payload.__class__.__module__,
95
115
  }
96
116
 
97
117
  elif tx_data.context_type == "websocket":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jararaca
3
- Version: 0.3.21
3
+ Version: 0.3.22
4
4
  Summary: A simple and fast API framework for Python
5
5
  Home-page: https://github.com/LuscasLeo/jararaca
6
6
  Author: Lucas S
@@ -1,6 +1,6 @@
1
1
  LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
2
2
  README.md,sha256=YmCngjU8llW0l7L3tuXkkfr8qH7V9aBMgfp2jEzeiKg,3517
3
- pyproject.toml,sha256=1QikgEzMNE0_aLqRgBfMZPMq8hLWsTF-xXTd5umzyb4,2739
3
+ pyproject.toml,sha256=cIaZ30kR0_7WQwX6DOqoxWOKZrZ71y8bIh81lS5SYyg,2739
4
4
  jararaca/__init__.py,sha256=niZQiN-Whyw2ExcwQbB8uBDPy90pK36pPwa7dYkecuU,22822
5
5
  jararaca/__main__.py,sha256=-O3vsB5lHdqNFjUtoELDF81IYFtR-DSiiFMzRaiSsv4,67
6
6
  jararaca/broker_backend/__init__.py,sha256=GzEIuHR1xzgCJD4FE3harNjoaYzxHMHoEL0_clUaC-k,3528
@@ -24,13 +24,13 @@ jararaca/messagebus/interceptors/aiopika_publisher_interceptor.py,sha256=vs8kCZY
24
24
  jararaca/messagebus/interceptors/publisher_interceptor.py,sha256=ojy1bRhqMgrkQljcGGS8cd8-8pUjL8ZHjIUkdmaAnNM,1325
25
25
  jararaca/messagebus/message.py,sha256=U6cyd2XknX8mtm0333slz5fanky2PFLWCmokAO56vvU,819
26
26
  jararaca/messagebus/publisher.py,sha256=JTkxdKbvxvDWT8nK8PVEyyX061vYYbKQMxRHXrZtcEY,2173
27
- jararaca/messagebus/worker.py,sha256=vni08oRRB-Vz_qXOOoxRDnBTuO8a_rZ6Zue0qx3UUes,69202
27
+ jararaca/messagebus/worker.py,sha256=DiKDUhcU4rEjjA_3KqCmnN3X5yyokZq_-SbLryjS_PM,69237
28
28
  jararaca/microservice.py,sha256=DW4RVeqgrx4J-dAg17sbzTn_sLXuvV1UOQFde2fpqds,11471
29
29
  jararaca/observability/decorators.py,sha256=vKAPGLyKz092rd1K4k3xtI2FrRafN69EEuRZKEhaLSk,5627
30
30
  jararaca/observability/hooks.py,sha256=VRYg-vlNlFxu9FqOgxyS9VIY6zDcCcgOuZ0RhTUtjwY,488
31
31
  jararaca/observability/interceptor.py,sha256=U4ZLM0f8j6Q7gMUKKnA85bnvD-Qa0ii79Qa_X8KsXAQ,1498
32
32
  jararaca/observability/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- jararaca/observability/providers/otel.py,sha256=fqgvwwQ4BSrjBPVlwU21g5pyVGvwT4NtWeEPdMqrAN0,8667
33
+ jararaca/observability/providers/otel.py,sha256=LgkDRLRFA689ypfVjR67EU-eFHYBZRU01npDs-K8HMQ,9613
34
34
  jararaca/persistence/base.py,sha256=xnGUbsLNz3gO-9iJt-Sn5NY13Yc9-misP8wLwQuGGoM,1024
35
35
  jararaca/persistence/exports.py,sha256=Ghx4yoFaB4QVTb9WxrFYgmcSATXMNvrOvT8ybPNKXCA,62
36
36
  jararaca/persistence/interceptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -76,8 +76,8 @@ jararaca/tools/typescript/interface_parser.py,sha256=yOSuOXKOeG0soGFo0fKiZIabu4Y
76
76
  jararaca/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
77
  jararaca/utils/rabbitmq_utils.py,sha256=ytdAFUyv-OBkaVnxezuJaJoLrmN7giZgtKeet_IsMBs,10918
78
78
  jararaca/utils/retry.py,sha256=DzPX_fXUvTqej6BQ8Mt2dvLo9nNlTBm7Kx2pFZ26P2Q,4668
79
- jararaca-0.3.21.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
80
- jararaca-0.3.21.dist-info/METADATA,sha256=zKDzPGbhh3tL9I3pean1c-LZFO6UP3J7FIcfobuRSt4,5149
81
- jararaca-0.3.21.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
82
- jararaca-0.3.21.dist-info/entry_points.txt,sha256=WIh3aIvz8LwUJZIDfs4EeH3VoFyCGEk7cWJurW38q0I,45
83
- jararaca-0.3.21.dist-info/RECORD,,
79
+ jararaca-0.3.22.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
80
+ jararaca-0.3.22.dist-info/METADATA,sha256=--9VrDmq9co0M_0CDIcr_GjlbwhmHKypO4dh5F4sZYQ,5149
81
+ jararaca-0.3.22.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
82
+ jararaca-0.3.22.dist-info/entry_points.txt,sha256=WIh3aIvz8LwUJZIDfs4EeH3VoFyCGEk7cWJurW38q0I,45
83
+ jararaca-0.3.22.dist-info/RECORD,,
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "jararaca"
3
- version = "0.3.21"
3
+ version = "0.3.22"
4
4
  description = "A simple and fast API framework for Python"
5
5
  authors = ["Lucas S <me@luscasleo.dev>"]
6
6
  readme = "README.md"