traceable-agent 2.0.0__tar.gz → 2.0.1__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.
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/PKG-INFO +1 -1
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/setup.py +21 -21
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceable_agent.egg-info/PKG-INFO +1 -1
- traceable-agent-2.0.1/src/traceable_agent.egg-info/requires.txt +28 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/agent_init.py +0 -9
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/__init__.py +6 -39
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/aws_lambda/__init__.py +2 -1
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/flask/__init__.py +2 -1
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/grpc/__init__.py +2 -1
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/requests/__init__.py +2 -1
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/version.py +1 -1
- traceable-agent-2.0.0/src/traceable_agent.egg-info/requires.txt +0 -28
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/MANIFEST.in +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/README.md +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/pyproject.toml +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/setup.cfg +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceable_agent.egg-info/SOURCES.txt +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceable_agent.egg-info/dependency_links.txt +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceable_agent.egg-info/entry_points.txt +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceable_agent.egg-info/top_level.txt +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/agent.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/autoinstrumentation/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/autoinstrumentation/sitecustomize.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/autoinstrumentation/wrapper.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/config/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/config/config.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/config/config_pb2.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/config/default.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/config/environment.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/constants.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/custom_logger.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/env.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/filter/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/filter/filter.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/filter/registry.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/filter/traceable.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/aiohttp/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/boto/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/botocore/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/django/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/django/django_auto_instrumentation_compat.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/fast_api/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/fast_api/fast_api_auto_instrumentation_compat.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/instrumentation_definitions.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/mysql/__init__.py +0 -0
- {traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/postgresql/__init__.py +0 -0
|
@@ -30,30 +30,30 @@ setup(
|
|
|
30
30
|
)
|
|
31
31
|
],
|
|
32
32
|
install_requires=[
|
|
33
|
-
"opentelemetry-api==1.
|
|
34
|
-
"opentelemetry-exporter-otlp==1.
|
|
35
|
-
"opentelemetry-instrumentation==0.
|
|
36
|
-
"opentelemetry-instrumentation-aiohttp-client==0.
|
|
37
|
-
"opentelemetry-instrumentation-boto==0.
|
|
38
|
-
"opentelemetry-instrumentation-botocore==0.
|
|
39
|
-
"opentelemetry-instrumentation-wsgi==0.
|
|
40
|
-
"opentelemetry-instrumentation-fastapi==0.
|
|
41
|
-
"opentelemetry-instrumentation-flask==0.
|
|
42
|
-
"opentelemetry-instrumentation-mysql==0.
|
|
43
|
-
"opentelemetry-instrumentation-psycopg2==0.
|
|
44
|
-
"opentelemetry-instrumentation-requests==0.
|
|
45
|
-
"opentelemetry-instrumentation-grpc==0.
|
|
46
|
-
"opentelemetry-instrumentation-django==0.
|
|
47
|
-
"opentelemetry-instrumentation-aws-lambda==0.
|
|
48
|
-
"opentelemetry-propagator-b3==1.
|
|
49
|
-
"opentelemetry-proto==1.
|
|
50
|
-
"opentelemetry-sdk==1.
|
|
51
|
-
"opentelemetry-util-http==0.
|
|
33
|
+
"opentelemetry-api==1.30.0",
|
|
34
|
+
"opentelemetry-exporter-otlp==1.30.0",
|
|
35
|
+
"opentelemetry-instrumentation==0.51b0",
|
|
36
|
+
"opentelemetry-instrumentation-aiohttp-client==0.51b0",
|
|
37
|
+
"opentelemetry-instrumentation-boto==0.51b0",
|
|
38
|
+
"opentelemetry-instrumentation-botocore==0.51b0",
|
|
39
|
+
"opentelemetry-instrumentation-wsgi==0.51b0",
|
|
40
|
+
"opentelemetry-instrumentation-fastapi==0.51b0",
|
|
41
|
+
"opentelemetry-instrumentation-flask==0.51b0",
|
|
42
|
+
"opentelemetry-instrumentation-mysql==0.51b0",
|
|
43
|
+
"opentelemetry-instrumentation-psycopg2==0.51b0",
|
|
44
|
+
"opentelemetry-instrumentation-requests==0.51b0",
|
|
45
|
+
"opentelemetry-instrumentation-grpc==0.51b0",
|
|
46
|
+
"opentelemetry-instrumentation-django==0.51b0",
|
|
47
|
+
"opentelemetry-instrumentation-aws-lambda==0.51b0",
|
|
48
|
+
"opentelemetry-propagator-b3==1.30.0",
|
|
49
|
+
"opentelemetry-proto==1.30.0",
|
|
50
|
+
"opentelemetry-sdk==1.30.0",
|
|
51
|
+
"opentelemetry-util-http==0.51b0",
|
|
52
52
|
"google>=3.0.0",
|
|
53
53
|
"pyyaml",
|
|
54
|
-
"protobuf
|
|
54
|
+
"protobuf",
|
|
55
55
|
"psutil",
|
|
56
|
-
"distro
|
|
56
|
+
"distro",
|
|
57
57
|
"cffi",
|
|
58
58
|
"setuptools",
|
|
59
59
|
"jaraco.text",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
opentelemetry-api==1.30.0
|
|
2
|
+
opentelemetry-exporter-otlp==1.30.0
|
|
3
|
+
opentelemetry-instrumentation==0.51b0
|
|
4
|
+
opentelemetry-instrumentation-aiohttp-client==0.51b0
|
|
5
|
+
opentelemetry-instrumentation-boto==0.51b0
|
|
6
|
+
opentelemetry-instrumentation-botocore==0.51b0
|
|
7
|
+
opentelemetry-instrumentation-wsgi==0.51b0
|
|
8
|
+
opentelemetry-instrumentation-fastapi==0.51b0
|
|
9
|
+
opentelemetry-instrumentation-flask==0.51b0
|
|
10
|
+
opentelemetry-instrumentation-mysql==0.51b0
|
|
11
|
+
opentelemetry-instrumentation-psycopg2==0.51b0
|
|
12
|
+
opentelemetry-instrumentation-requests==0.51b0
|
|
13
|
+
opentelemetry-instrumentation-grpc==0.51b0
|
|
14
|
+
opentelemetry-instrumentation-django==0.51b0
|
|
15
|
+
opentelemetry-instrumentation-aws-lambda==0.51b0
|
|
16
|
+
opentelemetry-propagator-b3==1.30.0
|
|
17
|
+
opentelemetry-proto==1.30.0
|
|
18
|
+
opentelemetry-sdk==1.30.0
|
|
19
|
+
opentelemetry-util-http==0.51b0
|
|
20
|
+
google>=3.0.0
|
|
21
|
+
pyyaml
|
|
22
|
+
protobuf
|
|
23
|
+
psutil
|
|
24
|
+
distro
|
|
25
|
+
cffi
|
|
26
|
+
setuptools
|
|
27
|
+
jaraco.text
|
|
28
|
+
platformdirs
|
|
@@ -110,19 +110,10 @@ class AgentInit: # pylint: disable=R0902,R0903
|
|
|
110
110
|
composite_propagators = CompositePropagator(propagator_list)
|
|
111
111
|
set_global_textmap(composite_propagators)
|
|
112
112
|
|
|
113
|
-
def _set_wrapper_fields(self, wrapper):
|
|
114
|
-
data_cap = self._config.config.data_capture
|
|
115
|
-
wrapper.set_process_request_headers(data_cap.http_headers.request)
|
|
116
|
-
wrapper.set_process_request_body(data_cap.http_body.request)
|
|
117
|
-
wrapper.set_process_response_headers(data_cap.http_headers.response)
|
|
118
|
-
wrapper.set_process_response_body(data_cap.http_body.response)
|
|
119
|
-
wrapper.set_body_max_size(data_cap.body_max_size_bytes)
|
|
120
|
-
|
|
121
113
|
def init_library_instrumentation(self, instrumentation_name, wrapper_instance):
|
|
122
114
|
"""used to configure instrumentation wrapper settings + apply instrumentation"""
|
|
123
115
|
logger.debug("Attempting to initialize %s instrumentation", instrumentation_name)
|
|
124
116
|
try:
|
|
125
|
-
self._set_wrapper_fields(wrapper_instance)
|
|
126
117
|
wrapper_instance.instrument()
|
|
127
118
|
except Exception as err: # pylint: disable=W0703
|
|
128
119
|
logger.debug(constants.INST_WRAP_EXCEPTION_MSSG,
|
|
@@ -3,6 +3,7 @@ import sys
|
|
|
3
3
|
import traceback
|
|
4
4
|
from opentelemetry.trace.span import Span
|
|
5
5
|
|
|
6
|
+
from traceableai.config.config import Config
|
|
6
7
|
from traceableai.custom_logger import get_custom_logger
|
|
7
8
|
logger = get_custom_logger(__name__)
|
|
8
9
|
|
|
@@ -24,46 +25,12 @@ class BaseInstrumentorWrapper:
|
|
|
24
25
|
def __init__(self):
|
|
25
26
|
'''constructor'''
|
|
26
27
|
logger.debug('Entering BaseInstrumentorWrapper constructor.')
|
|
28
|
+
self._process_request_headers = Config()._instance.config.data_capture.http_headers.request.value
|
|
29
|
+
self._process_response_headers = Config()._instance.config.data_capture.http_headers.response.value
|
|
30
|
+
self._process_request_body = Config()._instance.config.data_capture.http_body.request.value
|
|
31
|
+
self._process_response_body = Config()._instance.config.data_capture.http_body.response.value
|
|
32
|
+
self._max_body_size = Config()._instance.config.data_capture.body_max_size_bytes.value
|
|
27
33
|
super().__init__()
|
|
28
|
-
self._process_request_headers = False
|
|
29
|
-
self._process_response_headers = False
|
|
30
|
-
self._process_request_body = False
|
|
31
|
-
self._process_response_body = False
|
|
32
|
-
self._max_body_size = 128 * 1024
|
|
33
|
-
|
|
34
|
-
# Set whether request headers should be put in extended span, takes a BoolValue as input
|
|
35
|
-
def set_process_request_headers(self, process_request_headers) -> None:
|
|
36
|
-
'''Should it process request headers?'''
|
|
37
|
-
logger.debug('Setting self._process_request_headers to \'%s\'',
|
|
38
|
-
process_request_headers.value)
|
|
39
|
-
self._process_request_headers = process_request_headers.value
|
|
40
|
-
|
|
41
|
-
# Set whether response headers should be put in extended span, takes a BoolValue as input
|
|
42
|
-
def set_process_response_headers(self, process_response_headers) -> None:
|
|
43
|
-
'''Should it process response headers?'''
|
|
44
|
-
logger.debug('Setting self._process_response_headers to \'%s\'',
|
|
45
|
-
process_response_headers.value)
|
|
46
|
-
self._process_response_headers = process_response_headers.value
|
|
47
|
-
|
|
48
|
-
# Set whether request body should be put in extended span, takes a BoolValue as input
|
|
49
|
-
def set_process_request_body(self, process_request_body) -> None:
|
|
50
|
-
'''should it process request body?'''
|
|
51
|
-
logger.debug('Setting self._process_request_body to \'%s\'',
|
|
52
|
-
process_request_body.value)
|
|
53
|
-
self._process_request_body = process_request_body.value
|
|
54
|
-
|
|
55
|
-
# Set whether response body should be put in extended span, takes a BoolValue as input
|
|
56
|
-
def set_process_response_body(self, process_response_body) -> None:
|
|
57
|
-
'''should it process response body?'''
|
|
58
|
-
logger.debug('Setting self._process_response_body to \'%s\'',
|
|
59
|
-
process_response_body.value)
|
|
60
|
-
self._process_response_body = process_response_body.value
|
|
61
|
-
|
|
62
|
-
# Set max body size
|
|
63
|
-
def set_body_max_size(self, max_body_size) -> None:
|
|
64
|
-
'''Set the max body size for this instrumentor.'''
|
|
65
|
-
logger.debug('Setting self.body_max_size to %s.', max_body_size.value)
|
|
66
|
-
self._max_body_size = max_body_size.value
|
|
67
34
|
|
|
68
35
|
# we need the headers lowercased multiple times
|
|
69
36
|
# just do it once upfront
|
|
@@ -29,7 +29,8 @@ class AwsLambdaInstrumentorWrapper(AwsLambdaInstrumentor, BaseInstrumentorWrappe
|
|
|
29
29
|
def __init__(self):
|
|
30
30
|
'''Constructor'''
|
|
31
31
|
logger.debug('Entering AwsLambdaInstrumentorWrapper.__init__().')
|
|
32
|
-
|
|
32
|
+
AwsLambdaInstrumentor.__init__(self)
|
|
33
|
+
BaseInstrumentorWrapper.__init__(self)
|
|
33
34
|
|
|
34
35
|
def uninstrument(self, **kwargs):
|
|
35
36
|
pass
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/flask/__init__.py
RENAMED
|
@@ -117,7 +117,8 @@ class FlaskInstrumentorWrapper(FlaskInstrumentor, BaseInstrumentorWrapper):
|
|
|
117
117
|
|
|
118
118
|
def __init__(self):
|
|
119
119
|
logger.debug('Entering FlaskInstrumentorWrapper constructor.')
|
|
120
|
-
|
|
120
|
+
FlaskInstrumentor.__init__(self)
|
|
121
|
+
BaseInstrumentorWrapper.__init__(self)
|
|
121
122
|
self._app = None
|
|
122
123
|
|
|
123
124
|
def with_app(self, app=None):
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/grpc/__init__.py
RENAMED
|
@@ -29,7 +29,8 @@ class GrpcInstrumentorServerWrapper(GrpcInstrumentorServer, BaseInstrumentorWrap
|
|
|
29
29
|
def __init__(self):
|
|
30
30
|
'''constructor'''
|
|
31
31
|
logger.debug('Entering GrpcInstrumentorServerWrapper constructor.')
|
|
32
|
-
|
|
32
|
+
GrpcInstrumentorServer.__init__(self)
|
|
33
|
+
BaseInstrumentorWrapper.__init__(self)
|
|
33
34
|
self._original_wrapper_func = None
|
|
34
35
|
|
|
35
36
|
# Enable wrapper instrumentation
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/requests/__init__.py
RENAMED
|
@@ -11,7 +11,8 @@ class RequestsInstrumentorWrapper(RequestsInstrumentor, BaseInstrumentorWrapper)
|
|
|
11
11
|
# Constructor
|
|
12
12
|
def __init__(self):
|
|
13
13
|
logger.debug('Entering RequestsInstrumentorWrapper.__init__().')
|
|
14
|
-
|
|
14
|
+
RequestsInstrumentor.__init__(self)
|
|
15
|
+
BaseInstrumentorWrapper.__init__(self)
|
|
15
16
|
|
|
16
17
|
def _instrument(self, **kwargs) -> None:
|
|
17
18
|
'''internal enable instrumentation'''
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
opentelemetry-api==1.26.0
|
|
2
|
-
opentelemetry-exporter-otlp==1.26.0
|
|
3
|
-
opentelemetry-instrumentation==0.47b0
|
|
4
|
-
opentelemetry-instrumentation-aiohttp-client==0.47b0
|
|
5
|
-
opentelemetry-instrumentation-boto==0.47b0
|
|
6
|
-
opentelemetry-instrumentation-botocore==0.47b0
|
|
7
|
-
opentelemetry-instrumentation-wsgi==0.47b0
|
|
8
|
-
opentelemetry-instrumentation-fastapi==0.47b0
|
|
9
|
-
opentelemetry-instrumentation-flask==0.47b0
|
|
10
|
-
opentelemetry-instrumentation-mysql==0.47b0
|
|
11
|
-
opentelemetry-instrumentation-psycopg2==0.47b0
|
|
12
|
-
opentelemetry-instrumentation-requests==0.47b0
|
|
13
|
-
opentelemetry-instrumentation-grpc==0.47b0
|
|
14
|
-
opentelemetry-instrumentation-django==0.47b0
|
|
15
|
-
opentelemetry-instrumentation-aws-lambda==0.47b0
|
|
16
|
-
opentelemetry-propagator-b3==1.26.0
|
|
17
|
-
opentelemetry-proto==1.26.0
|
|
18
|
-
opentelemetry-sdk==1.26.0
|
|
19
|
-
opentelemetry-util-http==0.47b0
|
|
20
|
-
google>=3.0.0
|
|
21
|
-
pyyaml
|
|
22
|
-
protobuf<5
|
|
23
|
-
psutil
|
|
24
|
-
distro==1.6.0
|
|
25
|
-
cffi
|
|
26
|
-
setuptools
|
|
27
|
-
jaraco.text
|
|
28
|
-
platformdirs
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceable_agent.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceable_agent.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/autoinstrumentation/__init__.py
RENAMED
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/autoinstrumentation/sitecustomize.py
RENAMED
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/autoinstrumentation/wrapper.py
RENAMED
|
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
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/aiohttp/__init__.py
RENAMED
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/boto/__init__.py
RENAMED
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/botocore/__init__.py
RENAMED
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/django/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/fast_api/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{traceable-agent-2.0.0 → traceable-agent-2.0.1}/src/traceableai/instrumentation/mysql/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|