whatap-python 1.5.1__tar.gz → 1.5.3__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.
- {whatap-python-1.5.1 → whatap-python-1.5.3}/PKG-INFO +1 -1
- whatap-python-1.5.3/whatap/build.py +4 -0
- whatap-python-1.5.3/whatap/net/async_sender.py +61 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_fastapi.py +1 -1
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/logging.py +2 -2
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap_python.egg-info/PKG-INFO +1 -1
- whatap-python-1.5.1/whatap/build.py +0 -4
- whatap-python-1.5.1/whatap/net/async_sender.py +0 -28
- {whatap-python-1.5.1 → whatap-python-1.5.3}/README.md +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/setup.cfg +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/setup.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/LICENSE +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/README.rst +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/__main__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/agent/darwin/amd64/whatap_python +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/agent/darwin/arm64/whatap_python +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/agent/linux/amd64/whatap_python +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/agent/linux/arm64/whatap_python +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/bootstrap/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/bootstrap/sitecustomize.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/conf/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/conf/configuration.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/conf/configure.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/conf/license.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/control/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/io/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/io/data_inputx.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/io/data_outputx.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/net/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/net/packet_enum.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/net/packet_type_enum.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/net/param_def.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/net/stackhelper.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/net/udp_session.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/net/udp_thread.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/pack/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/pack/logSinkPack.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/pack/pack.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/pack/pack_enum.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/scripts/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/amqp_kombu.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/amqp_pika.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_bottle.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_celery.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_cherrypy.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_django.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_django_py3.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_flask.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_frappe.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_graphql.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_nameko.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_tornado.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/application_wsgi.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/database_mongo.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/database_mysql.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/database_postgresql.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/database_redis.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/database_toolkit.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/email_smtp.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/httpc_django.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/httpc_httplib.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/httpc_requests.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/httpc_urllib3.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/mod/plugin.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/trace_context.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/trace_context_manager.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/trace_import.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/trace/trace_module_definition.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/bit_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/cardinality/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/cardinality/hyperloglog.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/cardinality/murmurhash.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/cardinality/registerset.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/compare_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/date_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/debug_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/escape_literal_sql.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/hash_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/hexa32.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/int_set.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/ip_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/keygen.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/linked_list.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/linked_map.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/metering_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/request_double_queue.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/request_queue.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/string_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/throttle_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/util/userid_util.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/__init__.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/blob_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/boolean_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/decimal_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/double_summary.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/double_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/float_array.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/float_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/int_array.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/ip4_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/list_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/long_array.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/long_summary.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/map_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/null_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/number_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/summary_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/text_array.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/text_hash_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/text_value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/value.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/value/value_enum.py +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap/whatap.conf +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap_python.egg-info/SOURCES.txt +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap_python.egg-info/dependency_links.txt +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap_python.egg-info/entry_points.txt +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap_python.egg-info/not-zip-safe +0 -0
- {whatap-python-1.5.1 → whatap-python-1.5.3}/whatap_python.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import queue, time, threading
|
|
2
|
+
from . import udp_session
|
|
3
|
+
from whatap.conf.configure import Configure as conf
|
|
4
|
+
q = queue.Queue(conf.max_send_queue_size)
|
|
5
|
+
|
|
6
|
+
from enum import Enum
|
|
7
|
+
class SendType(Enum):
|
|
8
|
+
DATAS = 1
|
|
9
|
+
RELAY = 2
|
|
10
|
+
|
|
11
|
+
def send_packet( packet_type, ctx, datas=[]):
|
|
12
|
+
_initThread()
|
|
13
|
+
global q
|
|
14
|
+
if q.full():
|
|
15
|
+
return
|
|
16
|
+
q.put((SendType.DATAS, (packet_type, ctx, datas)))
|
|
17
|
+
|
|
18
|
+
def send_relaypack( packbytes):
|
|
19
|
+
_initThread()
|
|
20
|
+
global q
|
|
21
|
+
if q.full():
|
|
22
|
+
return
|
|
23
|
+
q.put((SendType.RELAY, packbytes))
|
|
24
|
+
|
|
25
|
+
def startWhatapThread():
|
|
26
|
+
def __sendPackets():
|
|
27
|
+
global q
|
|
28
|
+
while True:
|
|
29
|
+
packet_env = q.get()
|
|
30
|
+
if not packet_env:
|
|
31
|
+
time.sleep(0.1)
|
|
32
|
+
continue
|
|
33
|
+
sendType,params = packet_env
|
|
34
|
+
if sendType == SendType.DATAS:
|
|
35
|
+
packet_type, ctx, datas = params
|
|
36
|
+
udp_session.UdpSession.send_packet(packet_type, ctx, datas)
|
|
37
|
+
elif sendType == SendType.RELAY:
|
|
38
|
+
packbytes = params
|
|
39
|
+
udp_session.UdpSession.send_relaypack(packbytes)
|
|
40
|
+
t = threading.Thread(target=__sendPackets)
|
|
41
|
+
t.setDaemon(True)
|
|
42
|
+
t.start()
|
|
43
|
+
|
|
44
|
+
_lock = threading.Lock()
|
|
45
|
+
_initialized = False
|
|
46
|
+
|
|
47
|
+
def _initThread():
|
|
48
|
+
global _lock, _initialized
|
|
49
|
+
if _initialized:
|
|
50
|
+
return
|
|
51
|
+
try:
|
|
52
|
+
if _initialized:
|
|
53
|
+
return
|
|
54
|
+
_lock.acquire()
|
|
55
|
+
if _initialized:
|
|
56
|
+
return
|
|
57
|
+
_initialized=True
|
|
58
|
+
startWhatapThread()
|
|
59
|
+
finally:
|
|
60
|
+
_lock.release()
|
|
61
|
+
|
|
@@ -143,7 +143,7 @@ def interceptor_error_log(trxid, e, fn, args, kwargs):
|
|
|
143
143
|
bout.writePack(p, None)
|
|
144
144
|
packbytes = bout.toByteArray()
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
async_sender.send_relaypack(packbytes)
|
|
147
147
|
|
|
148
148
|
def interceptor(fn, dependant, *args, **kwargs):
|
|
149
149
|
if not hasattr(dependant, _WHATAP_DICT):
|
|
@@ -45,7 +45,7 @@ def instrument_loguru(module):
|
|
|
45
45
|
bout.writePack(p, None)
|
|
46
46
|
packbytes = bout.toByteArray()
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
async_sender.send_relaypack(packbytes)
|
|
49
49
|
return fn(*args, **kwargs)
|
|
50
50
|
return trace
|
|
51
51
|
if not loguru_injection_processed:
|
|
@@ -107,7 +107,7 @@ def instrument_logging(module):
|
|
|
107
107
|
bout.writePack(p, None)
|
|
108
108
|
packbytes = bout.toByteArray()
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
async_sender.send_relaypack(packbytes)
|
|
111
111
|
return fn(*args, **kwargs)
|
|
112
112
|
return trace
|
|
113
113
|
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import queue, time, threading
|
|
2
|
-
from . import udp_session
|
|
3
|
-
from whatap.conf.configure import Configure as conf
|
|
4
|
-
q = queue.Queue(conf.max_send_queue_size)
|
|
5
|
-
|
|
6
|
-
def send_packet( packet_type, ctx, datas=[]):
|
|
7
|
-
global q
|
|
8
|
-
if q.full():
|
|
9
|
-
return
|
|
10
|
-
q.put((packet_type, ctx, datas))
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def startWhatapThread():
|
|
14
|
-
def __sendPackets():
|
|
15
|
-
global q
|
|
16
|
-
while True:
|
|
17
|
-
packet_env = q.get()
|
|
18
|
-
if not packet_env:
|
|
19
|
-
time.sleep(0.1)
|
|
20
|
-
continue
|
|
21
|
-
packet_type, ctx, datas = packet_env
|
|
22
|
-
udp_session.UdpSession.send_packet(packet_type, ctx, datas)
|
|
23
|
-
|
|
24
|
-
t = threading.Thread(target=__sendPackets)
|
|
25
|
-
t.setDaemon(True)
|
|
26
|
-
t.start()
|
|
27
|
-
|
|
28
|
-
startWhatapThread()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|