whatap-python 1.6.3__tar.gz → 1.6.5__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.
- {whatap-python-1.6.3 → whatap_python-1.6.5}/PKG-INFO +1 -1
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/agent/darwin/amd64/whatap_python +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/agent/darwin/arm64/whatap_python +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/agent/linux/amd64/whatap_python +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/agent/linux/arm64/whatap_python +0 -0
- whatap_python-1.6.5/whatap/build.py +4 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_fastapi.py +4 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_frappe.py +4 -2
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_wsgi.py +35 -37
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/userid_util.py +5 -2
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap_python.egg-info/PKG-INFO +1 -1
- whatap-python-1.6.3/whatap/build.py +0 -4
- {whatap-python-1.6.3 → whatap_python-1.6.5}/README.md +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/setup.cfg +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/setup.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/LICENSE +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/README.rst +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/__main__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/bootstrap/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/bootstrap/sitecustomize.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/conf/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/conf/configuration.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/conf/configure.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/conf/license.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/control/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/io/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/io/data_inputx.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/io/data_outputx.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/net/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/net/async_sender.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/net/packet_enum.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/net/packet_type_enum.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/net/param_def.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/net/stackhelper.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/net/udp_session.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/net/udp_thread.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/pack/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/pack/logSinkPack.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/pack/pack.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/pack/pack_enum.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/scripts/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/amqp_kombu.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/amqp_pika.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_bottle.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_celery.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_cherrypy.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_django.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_django_py3.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_flask.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_graphql.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_nameko.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/application_tornado.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/database_mongo.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/database_mysql.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/database_postgresql.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/database_redis.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/database_toolkit.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/email_smtp.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/httpc_django.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/httpc_httplib.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/httpc_requests.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/httpc_urllib3.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/logging.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/mod/plugin.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/simple_trace_context.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/trace_context.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/trace_context_manager.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/trace_import.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/trace/trace_module_definition.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/bit_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/cardinality/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/cardinality/hyperloglog.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/cardinality/murmurhash.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/cardinality/registerset.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/compare_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/date_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/debug_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/escape_literal_sql.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/hash_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/hexa32.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/int_set.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/ip_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/keygen.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/linked_list.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/linked_map.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/metering_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/request_double_queue.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/request_queue.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/string_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/util/throttle_util.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/__init__.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/blob_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/boolean_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/decimal_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/double_summary.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/double_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/float_array.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/float_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/int_array.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/ip4_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/list_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/long_array.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/long_summary.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/map_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/null_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/number_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/summary_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/text_array.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/text_hash_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/text_value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/value.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/value/value_enum.py +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap/whatap.conf +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap_python.egg-info/SOURCES.txt +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap_python.egg-info/dependency_links.txt +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap_python.egg-info/entry_points.txt +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap_python.egg-info/not-zip-safe +0 -0
- {whatap-python-1.6.3 → whatap_python-1.6.5}/whatap_python.egg-info/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -60,6 +60,10 @@ def getRemoteAddr(headers, whatap_dict):
|
|
|
60
60
|
header_val = headers.get(conf.trace_http_client_ip_header_key)
|
|
61
61
|
if header_val:
|
|
62
62
|
return header_val.split(',')[0].strip()
|
|
63
|
+
x_forwarded_for = headers.get("x-forwarded-for")
|
|
64
|
+
x_forwarded_for = x_forwarded_for.split(',')[0].strip() if ',' in x_forwarded_for else None
|
|
65
|
+
if x_forwarded_for:
|
|
66
|
+
return x_forwarded_for
|
|
63
67
|
if whatap_dict:
|
|
64
68
|
return whatap_dict.get(_REMOTE_ADDR)
|
|
65
69
|
|
|
@@ -75,8 +75,11 @@ class UseridUtil(object):
|
|
|
75
75
|
header_val = UseridUtil.getHeader(args, conf.trace_http_client_ip_header_key)
|
|
76
76
|
if header_val:
|
|
77
77
|
return header_val.split(',')[0].strip()
|
|
78
|
-
|
|
78
|
+
x_forwarded_for = UseridUtil.getHeader(args, "x-forwarded-for")
|
|
79
|
+
if x_forwarded_for:
|
|
80
|
+
return x_forwarded_for.split(',')[0].strip()
|
|
79
81
|
return UseridUtil.getHeader(args, "REMOTE_ADDR")
|
|
82
|
+
#return UseridUtil.getHeader(args, "REMOTE_ADDR")
|
|
80
83
|
|
|
81
84
|
@staticmethod
|
|
82
85
|
def getHeader(args, key):
|
|
@@ -84,7 +87,6 @@ class UseridUtil(object):
|
|
|
84
87
|
if args:
|
|
85
88
|
environ = args[0]
|
|
86
89
|
wsgiHeaderKey = 'HTTP_'+key.upper().replace('-','_')
|
|
87
|
-
|
|
88
90
|
return environ.get(key, environ.get(wsgiHeaderKey))
|
|
89
91
|
else:
|
|
90
92
|
return None
|
|
@@ -200,45 +200,43 @@ def interceptor(rn_environ, *args, **kwargs):
|
|
|
200
200
|
try:
|
|
201
201
|
|
|
202
202
|
callback = fn(*args, **kwargs)
|
|
203
|
-
|
|
204
|
-
if
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
text
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
async_sender.send_packet(PacketTypeEnum.TX_MSG, ctx, datas)
|
|
233
|
-
return callback
|
|
203
|
+
query_string = environ.get('QUERY_STRING', '')
|
|
204
|
+
if query_string:
|
|
205
|
+
ctx.service_name += '?{}'.format(query_string)
|
|
206
|
+
|
|
207
|
+
if ctx.service_name.find('.') > -1 and ctx.service_name.split('.')[
|
|
208
|
+
1] in conf.web_static_content_extensions:
|
|
209
|
+
ctx.isStaticContents = 'true'
|
|
210
|
+
|
|
211
|
+
if getattr(callback, 'status_code', None):
|
|
212
|
+
status_code = callback.status_code
|
|
213
|
+
errors = [callback.reason_phrase, callback.__class__.__name__]
|
|
214
|
+
interceptor_error(status_code, errors, ctx=ctx)
|
|
215
|
+
|
|
216
|
+
if conf.profile_http_header_enabled:
|
|
217
|
+
keys = []
|
|
218
|
+
for key, value in environ.items():
|
|
219
|
+
if key.startswith('HTTP_'):
|
|
220
|
+
keys.append(key)
|
|
221
|
+
keys.sort()
|
|
222
|
+
|
|
223
|
+
text = ''
|
|
224
|
+
for key in keys:
|
|
225
|
+
text += '{}={}\n'.format(key.split('HTTP_')[1].lower(),
|
|
226
|
+
environ[key])
|
|
227
|
+
|
|
228
|
+
datas = ['HTTP-HEADERS', 'HTTP-HEADERS', text]
|
|
229
|
+
ctx.start_time = DateUtil.nowSystem()
|
|
230
|
+
async_sender.send_packet(PacketTypeEnum.TX_MSG, ctx, datas)
|
|
231
|
+
return callback
|
|
234
232
|
finally:
|
|
235
|
-
ctx
|
|
236
|
-
if ctx:
|
|
237
|
-
end_interceptor(ctx=ctx)
|
|
233
|
+
end_interceptor(ctx=ctx)
|
|
238
234
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
235
|
+
def interceptor_error(status_code, errors, ctx = None):
|
|
236
|
+
if not ctx:
|
|
237
|
+
ctx = TraceContextManager.getLocalContext()
|
|
238
|
+
if not ctx:
|
|
239
|
+
return
|
|
242
240
|
ctx.status = int(status_code / 100)
|
|
243
241
|
if ctx.status >= 4 and not ctx.error:
|
|
244
242
|
ctx.error = 1
|
|
@@ -126,5 +126,8 @@ class UseridUtil(object):
|
|
|
126
126
|
header_val = UseridUtil.getHeader(args, conf.trace_http_client_ip_header_key)
|
|
127
127
|
if header_val:
|
|
128
128
|
return header_val.split(',')[0].strip()
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
x_forwarded_for = UseridUtil.getHeader(args, "x-forwarded-for")
|
|
130
|
+
if x_forwarded_for:
|
|
131
|
+
return x_forwarded_for.split(',')[0].strip()
|
|
132
|
+
return UseridUtil.getHeader(args, "REMOTE_ADDR")
|
|
133
|
+
#return UseridUtil.getHeader(args, "REMOTE_ADDR")
|
|
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
|