whatap-python 1.8.13rc1__tar.gz → 1.8.13rc3__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.

Potentially problematic release.


This version of whatap-python might be problematic. Click here for more details.

Files changed (148) hide show
  1. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/PKG-INFO +1 -1
  2. whatap_python-1.8.13rc3/whatap/build.py +4 -0
  3. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/psycopg3.py +20 -13
  4. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/util.py +26 -4
  5. whatap_python-1.8.13rc3/whatap/trace/mod/httpc/httpx.py +36 -0
  6. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap_python.egg-info/PKG-INFO +1 -1
  7. whatap_python-1.8.13rc1/whatap/build.py +0 -4
  8. whatap_python-1.8.13rc1/whatap/trace/mod/httpc/httpx.py +0 -24
  9. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/README.md +0 -0
  10. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/setup.cfg +0 -0
  11. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/setup.py +0 -0
  12. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/LICENSE +0 -0
  13. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/README.rst +0 -0
  14. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/__init__.py +0 -0
  15. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/__main__.py +0 -0
  16. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/agent/darwin/amd64/whatap_python +0 -0
  17. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/agent/darwin/arm64/whatap_python +0 -0
  18. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/agent/linux/amd64/whatap_python +0 -0
  19. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/agent/linux/arm64/whatap_python +0 -0
  20. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/bootstrap/__init__.py +0 -0
  21. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/bootstrap/sitecustomize.py +0 -0
  22. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/conf/__init__.py +0 -0
  23. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/conf/configuration.py +0 -0
  24. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/conf/configure.py +0 -0
  25. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/conf/license.py +0 -0
  26. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/control/__init__.py +0 -0
  27. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/counter/__init__.py +0 -0
  28. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/counter/counter_manager.py +0 -0
  29. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/counter/tasks/__init__.py +0 -0
  30. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/counter/tasks/llm_stat.py +0 -0
  31. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/counter/tasks/openfiledescriptor.py +0 -0
  32. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/io/__init__.py +0 -0
  33. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/io/data_inputx.py +0 -0
  34. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/io/data_outputx.py +0 -0
  35. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/net/__init__.py +0 -0
  36. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/net/async_sender.py +0 -0
  37. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/net/packet_enum.py +0 -0
  38. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/net/packet_type_enum.py +0 -0
  39. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/net/param_def.py +0 -0
  40. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/net/stackhelper.py +0 -0
  41. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/net/udp_session.py +0 -0
  42. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/net/udp_thread.py +0 -0
  43. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/pack/__init__.py +0 -0
  44. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/pack/logSinkPack.py +0 -0
  45. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/pack/pack.py +0 -0
  46. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/pack/pack_enum.py +0 -0
  47. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/pack/tagCountPack.py +0 -0
  48. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/scripts/__init__.py +0 -0
  49. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/__init__.py +0 -0
  50. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/__init__.py +0 -0
  51. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/amqp/__init__.py +0 -0
  52. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/amqp/kombu.py +0 -0
  53. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/amqp/pika.py +0 -0
  54. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/__init__.py +0 -0
  55. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/bottle.py +0 -0
  56. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/celery.py +0 -0
  57. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/cherrypy.py +0 -0
  58. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/django.py +0 -0
  59. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/django_asgi.py +0 -0
  60. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/django_py3.py +0 -0
  61. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/fastapi.py +0 -0
  62. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/flask.py +0 -0
  63. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/frappe.py +0 -0
  64. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/graphql.py +0 -0
  65. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/nameko.py +0 -0
  66. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/odoo.py +0 -0
  67. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/starlette.py +0 -0
  68. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/tornado.py +0 -0
  69. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/application/wsgi.py +0 -0
  70. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/__init__.py +0 -0
  71. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/cxoracle.py +0 -0
  72. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/mongo.py +0 -0
  73. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/mysql.py +0 -0
  74. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/neo4j.py +0 -0
  75. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/psycopg2.py +0 -0
  76. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/redis.py +0 -0
  77. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/sqlalchemy.py +0 -0
  78. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/database/sqlite3.py +0 -0
  79. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/email/__init__.py +0 -0
  80. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/email/smtp.py +0 -0
  81. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/httpc/__init__.py +0 -0
  82. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/httpc/django.py +0 -0
  83. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/httpc/httplib.py +0 -0
  84. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/httpc/requests.py +0 -0
  85. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/httpc/urllib3.py +0 -0
  86. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/llm/__init__.py +0 -0
  87. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/llm/openai.py +0 -0
  88. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/logging.py +0 -0
  89. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/plugin.py +0 -0
  90. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/standalone/__init__.py +0 -0
  91. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/standalone/multiple.py +0 -0
  92. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/mod/standalone/single.py +0 -0
  93. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/simple_trace_context.py +0 -0
  94. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/trace_context.py +0 -0
  95. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/trace_context_manager.py +0 -0
  96. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/trace_import.py +0 -0
  97. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/trace/trace_module_definition.py +0 -0
  98. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/__init__.py +0 -0
  99. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/bit_util.py +0 -0
  100. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/cardinality/__init__.py +0 -0
  101. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/cardinality/hyperloglog.py +0 -0
  102. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/cardinality/murmurhash.py +0 -0
  103. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/cardinality/registerset.py +0 -0
  104. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/compare_util.py +0 -0
  105. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/date_util.py +0 -0
  106. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/debug_util.py +0 -0
  107. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/escape_literal_sql.py +0 -0
  108. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/hash_util.py +0 -0
  109. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/hexa32.py +0 -0
  110. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/int_set.py +0 -0
  111. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/ip_util.py +0 -0
  112. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/keygen.py +0 -0
  113. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/linked_list.py +0 -0
  114. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/linked_map.py +0 -0
  115. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/metering_util.py +0 -0
  116. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/request_double_queue.py +0 -0
  117. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/request_queue.py +0 -0
  118. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/string_util.py +0 -0
  119. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/throttle_util.py +0 -0
  120. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/util/userid_util.py +0 -0
  121. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/__init__.py +0 -0
  122. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/blob_value.py +0 -0
  123. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/boolean_value.py +0 -0
  124. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/decimal_value.py +0 -0
  125. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/double_summary.py +0 -0
  126. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/double_value.py +0 -0
  127. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/float_array.py +0 -0
  128. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/float_value.py +0 -0
  129. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/int_array.py +0 -0
  130. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/ip4_value.py +0 -0
  131. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/list_value.py +0 -0
  132. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/long_array.py +0 -0
  133. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/long_summary.py +0 -0
  134. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/map_value.py +0 -0
  135. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/null_value.py +0 -0
  136. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/number_value.py +0 -0
  137. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/summary_value.py +0 -0
  138. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/text_array.py +0 -0
  139. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/text_hash_value.py +0 -0
  140. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/text_value.py +0 -0
  141. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/value.py +0 -0
  142. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/value/value_enum.py +0 -0
  143. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap/whatap.conf +0 -0
  144. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap_python.egg-info/SOURCES.txt +0 -0
  145. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap_python.egg-info/dependency_links.txt +0 -0
  146. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap_python.egg-info/entry_points.txt +0 -0
  147. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap_python.egg-info/not-zip-safe +0 -0
  148. {whatap_python-1.8.13rc1 → whatap_python-1.8.13rc3}/whatap_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: whatap-python
3
- Version: 1.8.13rc1
3
+ Version: 1.8.13rc3
4
4
  Summary: Monitoring and Profiling Service
5
5
  Home-page: https://www.whatap.io
6
6
  Author: whatap
@@ -0,0 +1,4 @@
1
+ app = 'Python'
2
+ name = 'whatap-python'
3
+ version = '1.8.13rc3'
4
+ release_date = '20250926'
@@ -218,14 +218,17 @@ def _sync_wrapper(fn):
218
218
 
219
219
  db_info = {"type": "postgresql"}
220
220
 
221
- if args and isinstance(args[0], str) and '=' in args[0]:
221
+ if args:
222
222
  conn_str = args[0]
223
- parsed_kwargs = dict(
224
- x.split('=') for x in conn_str.split()
225
- )
226
- kwargs.update(parsed_kwargs)
227
-
228
- db_info.update(kwargs)
223
+ if isinstance(args[0], str) and '=' in args[0]:
224
+ parsed_kwargs = dict(
225
+ x.split('=') for x in conn_str.split()
226
+ )
227
+ kwargs.update(parsed_kwargs)
228
+ db_info.update(kwargs)
229
+ else:
230
+ db_info.update({"db_con_stc": "completed"})
231
+ db_info.update({"db_str": args[0]})
229
232
 
230
233
  connection = interceptor_db_con(fn, db_info, *args, **kwargs)
231
234
  if hasattr(connection, '_is_wrapped'):
@@ -243,14 +246,18 @@ def _async_wrapper(fn):
243
246
 
244
247
  db_info = {"type": "postgresql"}
245
248
 
246
- if args and isinstance(args[0], str) and '=' in args[0]:
249
+ if args:
247
250
  conn_str = args[0]
248
- parsed_kwargs = dict(
249
- x.split('=') for x in conn_str.split()
250
- )
251
- kwargs.update(parsed_kwargs)
251
+ if isinstance(args[0], str) and '=' in args[0]:
252
+ parsed_kwargs = dict(
253
+ x.split('=') for x in conn_str.split()
254
+ )
255
+ kwargs.update(parsed_kwargs)
256
+ db_info.update(kwargs)
257
+ else:
258
+ db_info.update({"db_con_stc": "completed"})
259
+ db_info.update({"db_str": args[0]})
252
260
 
253
- db_info.update(kwargs)
254
261
 
255
262
  connection = await async_interceptor_db_con(fn, db_info, *args, **kwargs)
256
263
  if hasattr(connection, '_is_wrapped'):
@@ -200,6 +200,10 @@ def interceptor_db_con(fn, db_info, *args, **kwargs):
200
200
  text += "/"
201
201
  text += db_info.get('user', '')
202
202
 
203
+ elif db_type == "postgresql":
204
+ if db_info.get('db_con_stc', '') == 'completed':
205
+ text = db_info.get('db_str', '')
206
+
203
207
  else:
204
208
  text = '{}://'.format(db_type)
205
209
  text += kwargs.get('user', '')
@@ -289,10 +293,17 @@ def interceptor_db_execute(fn, db_info, *args, **kwargs):
289
293
  except Exception as e:
290
294
  interceptor_step_error(e)
291
295
  finally:
292
- datas = [ctx.lctx.get('dbc', ''), query, str(self.rowcount)]
296
+ try:
297
+ if hasattr(args[0], 'rowcount'):
298
+ count = args[0].rowcount
299
+ else:
300
+ count = -1
301
+ except AttributeError:
302
+ count = -1
303
+
304
+ datas = [ctx.lctx.get('dbc', ''), query, str(count)]
293
305
  ctx.elapsed = DateUtil.nowSystem() - start_time
294
306
  async_sender.send_packet(PacketTypeEnum.TX_SQL, ctx, datas)
295
- count = self.rowcount
296
307
 
297
308
  if (count is not None) and (count > -1):
298
309
  desc = '{0}: {1}'.format('Fetch count', count)
@@ -351,6 +362,10 @@ async def async_interceptor_db_con(fn, db_info, *args, **kwargs):
351
362
 
352
363
  if db_type == "sqlite":
353
364
  text = "sqlite:"
365
+
366
+ elif db_type == "postgresql":
367
+ if db_info.get('db_con_stc', '') == 'completed':
368
+ text = db_info.get('db_str', '')
354
369
  else:
355
370
  text = '{}://'.format(db_type)
356
371
  text += kwargs.get('user', '')
@@ -445,10 +460,17 @@ async def async_interceptor_db_execute(fn, db_info, *args, **kwargs):
445
460
  interceptor_step_error(e)
446
461
  raise
447
462
  finally:
448
- datas = [ctx.lctx.get('dbc', ''), query, str(self.rowcount)]
463
+ try:
464
+ if hasattr(args[0], 'rowcount'):
465
+ count = args[0].rowcount
466
+ else:
467
+ count = -1
468
+ except AttributeError:
469
+ count = -1
470
+
471
+ datas = [ctx.lctx.get('dbc', ''), query, str(count)]
449
472
  ctx.elapsed = DateUtil.nowSystem() - start_time
450
473
  async_sender.send_packet(PacketTypeEnum.TX_SQL, ctx, datas)
451
- count = self.rowcount
452
474
 
453
475
  if (count is not None) and (count > -1):
454
476
  desc = '{0}: {1}'.format('Fetch count', count)
@@ -0,0 +1,36 @@
1
+ from whatap.trace.mod.application.wsgi import transfer, trace_handler, \
2
+ interceptor_httpc_request
3
+
4
+
5
+ def instrument_httpx(module):
6
+ def wrapper(fn):
7
+ @trace_handler(fn)
8
+ def trace(*args, **kwargs):
9
+ if len(args) >= 2 and hasattr(args[1], 'headers') and hasattr(args[1], 'url'):
10
+ request = args[1]
11
+ request.headers = transfer(request.headers)
12
+ httpc_url = str(request.url)
13
+
14
+ # 2. stream call: send(request=request, ...)
15
+ elif len(args) == 1 and 'request' in kwargs:
16
+ request = kwargs['request']
17
+ if hasattr(request, 'headers') and hasattr(request, 'url'):
18
+ request.headers = transfer(request.headers)
19
+ httpc_url = str(request.url)
20
+ else:
21
+ httpc_url = "invalid_request_object"
22
+
23
+ # 3. 예상치 못한 패턴
24
+ else:
25
+ httpc_url = "httpx_unknown_pattern"
26
+
27
+ return interceptor_httpc_request(fn, httpc_url, *args, **kwargs)
28
+
29
+ return trace
30
+
31
+ if hasattr(module, 'Client') and hasattr(module.Client, 'send'):
32
+ module.Client.send = wrapper(module.Client.send)
33
+
34
+
35
+ if hasattr(module, 'AsyncClient') and hasattr(module.AsyncClient, 'send'):
36
+ module.AsyncClient.send = wrapper(module.AsyncClient.send)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: whatap-python
3
- Version: 1.8.13rc1
3
+ Version: 1.8.13rc3
4
4
  Summary: Monitoring and Profiling Service
5
5
  Home-page: https://www.whatap.io
6
6
  Author: whatap
@@ -1,4 +0,0 @@
1
- app = 'Python'
2
- name = 'whatap-python'
3
- version = '1.8.13rc1'
4
- release_date = '20250917'
@@ -1,24 +0,0 @@
1
- from whatap.trace.mod.application.wsgi import transfer, trace_handler, \
2
- interceptor_httpc_request
3
-
4
-
5
- def instrument_httpx(module):
6
- def wrapper(fn):
7
- @trace_handler(fn)
8
- def trace(*args, **kwargs):
9
- request = args[1]
10
- request.headers = transfer(request.headers)
11
-
12
- httpc_url = str(request.url)
13
- callback = interceptor_httpc_request(fn, httpc_url, *args, **kwargs)
14
-
15
- return callback
16
-
17
- return trace
18
-
19
- if hasattr(module, 'Client') and hasattr(module.Client, 'send'):
20
- module.Client.send = wrapper(module.Client.send)
21
-
22
-
23
- if hasattr(module, 'AsyncClient') and hasattr(module.AsyncClient, 'send'):
24
- module.AsyncClient.send = wrapper(module.AsyncClient.send)