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

@@ -75,25 +75,39 @@ 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
79
  if tx_data.context_type == "http":
79
80
 
80
81
  headers = dict(tx_data.request.headers)
81
82
  title = f"HTTP {tx_data.request.method} {tx_data.request.url}"
83
+ extra_attributes = {
84
+ "http.method": tx_data.request.method,
85
+ "http.url": tx_data.request.url,
86
+ "http.status_code": tx_data.response.status_code,
87
+ }
82
88
 
83
89
  elif tx_data.context_type == "message_bus":
84
90
  title = f"Message Bus {tx_data.topic}"
85
91
  headers = use_implicit_headers() or {}
92
+ extra_attributes = {
93
+ "bus.topic": tx_data.topic,
94
+ "bus.message": tx_data.message.payload().model_dump_json(),
95
+ }
86
96
 
87
97
  elif tx_data.context_type == "websocket":
88
98
  headers = dict(tx_data.websocket.headers)
89
99
  title = f"WebSocket {tx_data.websocket.url}"
100
+ extra_attributes = {
101
+ "ws.url": str(tx_data.websocket.url),
102
+ }
90
103
 
91
104
  elif tx_data.context_type == "scheduler":
92
105
  title = f"Scheduler Task {tx_data.task_name}"
93
- headers = {
94
- "scheduled_to": tx_data.scheduled_to.isoformat(),
95
- "cron_expression": tx_data.cron_expression,
96
- "triggered_at": tx_data.triggered_at.isoformat(),
106
+ extra_attributes = {
107
+ "sched.task_name": tx_data.task_name,
108
+ "sched.scheduled_to": tx_data.scheduled_to.isoformat(),
109
+ "sched.cron_expression": tx_data.cron_expression,
110
+ "sched.triggered_at": tx_data.triggered_at.isoformat(),
97
111
  }
98
112
 
99
113
  carrier = {
@@ -118,6 +132,7 @@ class OtelTracingContextProviderFactory(TracingContextProviderFactory):
118
132
  context=ctx2,
119
133
  attributes={
120
134
  "app.context_type": tx_data.context_type,
135
+ **extra_attributes,
121
136
  },
122
137
  ) as root_span:
123
138
  cx = root_span.get_span_context()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jararaca
3
- Version: 0.3.19
3
+ Version: 0.3.21
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=JdgxP3SwJNa20HtUWhMdpWDnNTFyRb-sCzLStMMDOwM,2739
3
+ pyproject.toml,sha256=1QikgEzMNE0_aLqRgBfMZPMq8hLWsTF-xXTd5umzyb4,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
@@ -30,7 +30,7 @@ jararaca/observability/decorators.py,sha256=vKAPGLyKz092rd1K4k3xtI2FrRafN69EEuRZ
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=eYjejx7SW6FZ9-GTNiAxiTiae9RxQpiUSHiYN1rRZnI,8019
33
+ jararaca/observability/providers/otel.py,sha256=fqgvwwQ4BSrjBPVlwU21g5pyVGvwT4NtWeEPdMqrAN0,8667
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.19.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
80
- jararaca-0.3.19.dist-info/METADATA,sha256=Snc9WSwcSrBb-PyTB9v4BWurlSLPhuTaEHjKMZGdUck,5149
81
- jararaca-0.3.19.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
82
- jararaca-0.3.19.dist-info/entry_points.txt,sha256=WIh3aIvz8LwUJZIDfs4EeH3VoFyCGEk7cWJurW38q0I,45
83
- jararaca-0.3.19.dist-info/RECORD,,
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,,
pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "jararaca"
3
- version = "0.3.19"
3
+ version = "0.3.21"
4
4
  description = "A simple and fast API framework for Python"
5
5
  authors = ["Lucas S <me@luscasleo.dev>"]
6
6
  readme = "README.md"