ddtrace 3.11.0rc1__cp312-cp312-win_amd64.whl → 3.11.0rc3__cp312-cp312-win_amd64.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 ddtrace might be problematic. Click here for more details.
- ddtrace/_logger.py +5 -6
- ddtrace/_trace/product.py +1 -1
- ddtrace/_trace/sampling_rule.py +25 -33
- ddtrace/_trace/trace_handlers.py +12 -50
- ddtrace/_trace/utils_botocore/span_tags.py +48 -0
- ddtrace/_version.py +2 -2
- ddtrace/appsec/_asm_request_context.py +3 -1
- ddtrace/appsec/_constants.py +7 -0
- ddtrace/appsec/_handlers.py +11 -0
- ddtrace/appsec/_iast/_listener.py +12 -2
- ddtrace/appsec/_processor.py +1 -1
- ddtrace/contrib/integration_registry/registry.yaml +10 -0
- ddtrace/contrib/internal/aiobotocore/patch.py +8 -0
- ddtrace/contrib/internal/avro/__init__.py +17 -0
- ddtrace/contrib/internal/azure_functions/patch.py +23 -12
- ddtrace/contrib/internal/azure_functions/utils.py +14 -0
- ddtrace/contrib/internal/boto/patch.py +14 -0
- ddtrace/contrib/internal/botocore/__init__.py +153 -0
- ddtrace/contrib/internal/botocore/services/bedrock.py +3 -27
- ddtrace/contrib/internal/django/patch.py +31 -8
- ddtrace/contrib/{_freezegun.py → internal/freezegun/__init__.py} +1 -1
- ddtrace/contrib/internal/google_genai/_utils.py +2 -2
- ddtrace/contrib/internal/google_genai/patch.py +7 -7
- ddtrace/contrib/internal/google_generativeai/patch.py +7 -5
- ddtrace/contrib/internal/langchain/patch.py +11 -443
- ddtrace/contrib/internal/langchain/utils.py +0 -26
- ddtrace/contrib/internal/logbook/patch.py +1 -2
- ddtrace/contrib/internal/logging/patch.py +4 -7
- ddtrace/contrib/internal/loguru/patch.py +1 -3
- ddtrace/contrib/internal/openai_agents/patch.py +44 -1
- ddtrace/contrib/internal/protobuf/__init__.py +17 -0
- ddtrace/contrib/internal/pytest/__init__.py +62 -0
- ddtrace/contrib/internal/pytest/_plugin_v2.py +13 -4
- ddtrace/contrib/internal/pytest_bdd/__init__.py +23 -0
- ddtrace/contrib/internal/pytest_benchmark/__init__.py +3 -0
- ddtrace/contrib/internal/structlog/patch.py +2 -4
- ddtrace/contrib/internal/unittest/__init__.py +36 -0
- ddtrace/contrib/internal/vertexai/patch.py +7 -5
- ddtrace/ext/ci.py +20 -0
- ddtrace/ext/git.py +66 -11
- ddtrace/internal/_encoding.cp312-win_amd64.pyd +0 -0
- ddtrace/internal/_encoding.pyi +1 -1
- ddtrace/internal/_rand.cp312-win_amd64.pyd +0 -0
- ddtrace/internal/_tagset.cp312-win_amd64.pyd +0 -0
- ddtrace/internal/_threads.cp312-win_amd64.pyd +0 -0
- ddtrace/internal/ci_visibility/encoder.py +126 -49
- ddtrace/internal/ci_visibility/utils.py +4 -4
- ddtrace/internal/core/__init__.py +5 -2
- ddtrace/internal/datadog/profiling/dd_wrapper-unknown-amd64.dll +0 -0
- ddtrace/internal/datadog/profiling/dd_wrapper-unknown-amd64.lib +0 -0
- ddtrace/internal/datadog/profiling/ddup/_ddup.cp312-win_amd64.pyd +0 -0
- ddtrace/internal/datadog/profiling/ddup/_ddup.cp312-win_amd64.pyd.lib +0 -0
- ddtrace/internal/datadog/profiling/ddup/dd_wrapper-unknown-amd64.dll +0 -0
- ddtrace/internal/datadog/profiling/ddup/dd_wrapper-unknown-amd64.lib +0 -0
- ddtrace/internal/endpoints.py +76 -0
- ddtrace/internal/native/_native.cp312-win_amd64.pyd +0 -0
- ddtrace/internal/schema/processor.py +6 -2
- ddtrace/internal/telemetry/metrics_namespaces.cp312-win_amd64.pyd +0 -0
- ddtrace/internal/telemetry/writer.py +18 -0
- ddtrace/internal/test_visibility/coverage_lines.py +4 -4
- ddtrace/internal/writer/writer.py +24 -11
- ddtrace/llmobs/_constants.py +3 -0
- ddtrace/llmobs/_experiment.py +75 -10
- ddtrace/llmobs/_integrations/bedrock.py +4 -0
- ddtrace/llmobs/_integrations/bedrock_agents.py +5 -1
- ddtrace/llmobs/_integrations/crewai.py +52 -3
- ddtrace/llmobs/_integrations/gemini.py +7 -7
- ddtrace/llmobs/_integrations/google_genai.py +10 -10
- ddtrace/llmobs/_integrations/{google_genai_utils.py → google_utils.py} +103 -7
- ddtrace/llmobs/_integrations/langchain.py +29 -20
- ddtrace/llmobs/_integrations/openai_agents.py +145 -0
- ddtrace/llmobs/_integrations/pydantic_ai.py +67 -26
- ddtrace/llmobs/_integrations/utils.py +68 -158
- ddtrace/llmobs/_integrations/vertexai.py +8 -8
- ddtrace/llmobs/_llmobs.py +83 -14
- ddtrace/llmobs/_telemetry.py +20 -5
- ddtrace/llmobs/_utils.py +27 -0
- ddtrace/profiling/_threading.cp312-win_amd64.pyd +0 -0
- ddtrace/profiling/collector/_memalloc.cp312-win_amd64.pyd +0 -0
- ddtrace/profiling/collector/_task.cp312-win_amd64.pyd +0 -0
- ddtrace/profiling/collector/_traceback.cp312-win_amd64.pyd +0 -0
- ddtrace/profiling/collector/stack.cp312-win_amd64.pyd +0 -0
- ddtrace/settings/_config.py +1 -2
- ddtrace/settings/asm.py +9 -2
- ddtrace/settings/profiling.py +0 -9
- ddtrace/vendor/psutil/_psutil_windows.cp312-win_amd64.pyd +0 -0
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/METADATA +1 -1
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/RECORD +171 -177
- ddtrace/contrib/_avro.py +0 -17
- ddtrace/contrib/_botocore.py +0 -153
- ddtrace/contrib/_protobuf.py +0 -17
- ddtrace/contrib/_pytest.py +0 -62
- ddtrace/contrib/_pytest_bdd.py +0 -23
- ddtrace/contrib/_pytest_benchmark.py +0 -3
- ddtrace/contrib/_unittest.py +0 -36
- /ddtrace/contrib/{_aiobotocore.py → internal/aiobotocore/__init__.py} +0 -0
- /ddtrace/contrib/{_aiohttp_jinja2.py → internal/aiohttp_jinja2/__init__.py} +0 -0
- /ddtrace/contrib/{_aiomysql.py → internal/aiomysql/__init__.py} +0 -0
- /ddtrace/contrib/{_aiopg.py → internal/aiopg/__init__.py} +0 -0
- /ddtrace/contrib/{_aioredis.py → internal/aioredis/__init__.py} +0 -0
- /ddtrace/contrib/{_algoliasearch.py → internal/algoliasearch/__init__.py} +0 -0
- /ddtrace/contrib/{_anthropic.py → internal/anthropic/__init__.py} +0 -0
- /ddtrace/contrib/{_aredis.py → internal/aredis/__init__.py} +0 -0
- /ddtrace/contrib/{_asyncio.py → internal/asyncio/__init__.py} +0 -0
- /ddtrace/contrib/{_asyncpg.py → internal/asyncpg/__init__.py} +0 -0
- /ddtrace/contrib/{_aws_lambda.py → internal/aws_lambda/__init__.py} +0 -0
- /ddtrace/contrib/{_azure_functions.py → internal/azure_functions/__init__.py} +0 -0
- /ddtrace/contrib/{_azure_servicebus.py → internal/azure_servicebus/__init__.py} +0 -0
- /ddtrace/contrib/{_boto.py → internal/boto/__init__.py} +0 -0
- /ddtrace/contrib/{_cassandra.py → internal/cassandra/__init__.py} +0 -0
- /ddtrace/contrib/{_consul.py → internal/consul/__init__.py} +0 -0
- /ddtrace/contrib/{_coverage.py → internal/coverage/__init__.py} +0 -0
- /ddtrace/contrib/{_crewai.py → internal/crewai/__init__.py} +0 -0
- /ddtrace/contrib/{_django.py → internal/django/__init__.py} +0 -0
- /ddtrace/contrib/{_dogpile_cache.py → internal/dogpile_cache/__init__.py} +0 -0
- /ddtrace/contrib/{_dramatiq.py → internal/dramatiq/__init__.py} +0 -0
- /ddtrace/contrib/{_elasticsearch.py → internal/elasticsearch/__init__.py} +0 -0
- /ddtrace/contrib/{_fastapi.py → internal/fastapi/__init__.py} +0 -0
- /ddtrace/contrib/{_flask.py → internal/flask/__init__.py} +0 -0
- /ddtrace/contrib/{_futures.py → internal/futures/__init__.py} +0 -0
- /ddtrace/contrib/{_gevent.py → internal/gevent/__init__.py} +0 -0
- /ddtrace/contrib/{_google_genai.py → internal/google_genai/__init__.py} +0 -0
- /ddtrace/contrib/{_google_generativeai.py → internal/google_generativeai/__init__.py} +0 -0
- /ddtrace/contrib/{_graphql.py → internal/graphql/__init__.py} +0 -0
- /ddtrace/contrib/{_grpc.py → internal/grpc/__init__.py} +0 -0
- /ddtrace/contrib/{_gunicorn.py → internal/gunicorn/__init__.py} +0 -0
- /ddtrace/contrib/{_httplib.py → internal/httplib/__init__.py} +0 -0
- /ddtrace/contrib/{_httpx.py → internal/httpx/__init__.py} +0 -0
- /ddtrace/contrib/{_jinja2.py → internal/jinja2/__init__.py} +0 -0
- /ddtrace/contrib/{_kafka.py → internal/kafka/__init__.py} +0 -0
- /ddtrace/contrib/{_kombu.py → internal/kombu/__init__.py} +0 -0
- /ddtrace/contrib/{_langchain.py → internal/langchain/__init__.py} +0 -0
- /ddtrace/contrib/{_langgraph.py → internal/langgraph/__init__.py} +0 -0
- /ddtrace/contrib/{_litellm.py → internal/litellm/__init__.py} +0 -0
- /ddtrace/contrib/{_logbook.py → internal/logbook/__init__.py} +0 -0
- /ddtrace/contrib/{_logging.py → internal/logging/__init__.py} +0 -0
- /ddtrace/contrib/{_loguru.py → internal/loguru/__init__.py} +0 -0
- /ddtrace/contrib/{_mako.py → internal/mako/__init__.py} +0 -0
- /ddtrace/contrib/{_mariadb.py → internal/mariadb/__init__.py} +0 -0
- /ddtrace/contrib/{_mcp.py → internal/mcp/__init__.py} +0 -0
- /ddtrace/contrib/{_molten.py → internal/molten/__init__.py} +0 -0
- /ddtrace/contrib/{_mongoengine.py → internal/mongoengine/__init__.py} +0 -0
- /ddtrace/contrib/{_mysql.py → internal/mysql/__init__.py} +0 -0
- /ddtrace/contrib/{_mysqldb.py → internal/mysqldb/__init__.py} +0 -0
- /ddtrace/contrib/{_openai.py → internal/openai/__init__.py} +0 -0
- /ddtrace/contrib/{_openai_agents.py → internal/openai_agents/__init__.py} +0 -0
- /ddtrace/contrib/{_psycopg.py → internal/psycopg/__init__.py} +0 -0
- /ddtrace/contrib/{_pydantic_ai.py → internal/pydantic_ai/__init__.py} +0 -0
- /ddtrace/contrib/{_pymemcache.py → internal/pymemcache/__init__.py} +0 -0
- /ddtrace/contrib/{_pymongo.py → internal/pymongo/__init__.py} +0 -0
- /ddtrace/contrib/{_pymysql.py → internal/pymysql/__init__.py} +0 -0
- /ddtrace/contrib/{_pynamodb.py → internal/pynamodb/__init__.py} +0 -0
- /ddtrace/contrib/{_pyodbc.py → internal/pyodbc/__init__.py} +0 -0
- /ddtrace/contrib/{_redis.py → internal/redis/__init__.py} +0 -0
- /ddtrace/contrib/{_rediscluster.py → internal/rediscluster/__init__.py} +0 -0
- /ddtrace/contrib/{_rq.py → internal/rq/__init__.py} +0 -0
- /ddtrace/contrib/{_sanic.py → internal/sanic/__init__.py} +0 -0
- /ddtrace/contrib/{_selenium.py → internal/selenium/__init__.py} +0 -0
- /ddtrace/contrib/{_snowflake.py → internal/snowflake/__init__.py} +0 -0
- /ddtrace/contrib/{_sqlite3.py → internal/sqlite3/__init__.py} +0 -0
- /ddtrace/contrib/{_starlette.py → internal/starlette/__init__.py} +0 -0
- /ddtrace/contrib/{_structlog.py → internal/structlog/__init__.py} +0 -0
- /ddtrace/contrib/{_subprocess.py → internal/subprocess/__init__.py} +0 -0
- /ddtrace/contrib/{_urllib.py → internal/urllib/__init__.py} +0 -0
- /ddtrace/contrib/{_urllib3.py → internal/urllib3/__init__.py} +0 -0
- /ddtrace/contrib/{_vertexai.py → internal/vertexai/__init__.py} +0 -0
- /ddtrace/contrib/{_vertica.py → internal/vertica/__init__.py} +0 -0
- /ddtrace/contrib/{_webbrowser.py → internal/webbrowser/__init__.py} +0 -0
- /ddtrace/contrib/{_yaaredis.py → internal/yaaredis/__init__.py} +0 -0
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/WHEEL +0 -0
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/entry_points.txt +0 -0
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/licenses/LICENSE +0 -0
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/licenses/LICENSE.Apache +0 -0
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/licenses/LICENSE.BSD3 +0 -0
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/licenses/NOTICE +0 -0
- {ddtrace-3.11.0rc1.dist-info → ddtrace-3.11.0rc3.dist-info}/top_level.txt +0 -0
ddtrace/contrib/_avro.py
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
The Avro integration will trace all Avro read / write calls made with the ``avro``
|
3
|
-
library. This integration is enabled by default.
|
4
|
-
|
5
|
-
Enabling
|
6
|
-
~~~~~~~~
|
7
|
-
|
8
|
-
The avro integration is enabled by default. Use
|
9
|
-
:func:`patch()<ddtrace.patch>` to enable the integration::
|
10
|
-
|
11
|
-
from ddtrace import patch
|
12
|
-
patch(avro=True)
|
13
|
-
|
14
|
-
Configuration
|
15
|
-
~~~~~~~~~~~~~
|
16
|
-
|
17
|
-
"""
|
ddtrace/contrib/_botocore.py
DELETED
@@ -1,153 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
The Botocore integration will trace all AWS calls made with the botocore
|
3
|
-
library. Libraries like Boto3 that use Botocore will also be patched.
|
4
|
-
|
5
|
-
Enabling
|
6
|
-
~~~~~~~~
|
7
|
-
|
8
|
-
The botocore integration is enabled automatically when using
|
9
|
-
:ref:`ddtrace-run<ddtracerun>` or :ref:`import ddtrace.auto<ddtraceauto>`.
|
10
|
-
|
11
|
-
Or use :func:`patch()<ddtrace.patch>` to manually enable the integration::
|
12
|
-
|
13
|
-
from ddtrace import patch
|
14
|
-
patch(botocore=True)
|
15
|
-
|
16
|
-
To patch only specific botocore modules, pass a list of the module names instead::
|
17
|
-
|
18
|
-
from ddtrace import patch
|
19
|
-
patch(botocore=['s3', 'sns'])
|
20
|
-
|
21
|
-
Configuration
|
22
|
-
~~~~~~~~~~~~~
|
23
|
-
|
24
|
-
.. py:data:: ddtrace.config.botocore['distributed_tracing']
|
25
|
-
|
26
|
-
Whether to inject distributed tracing data to requests in SQS, SNS, EventBridge, Kinesis Streams and Lambda.
|
27
|
-
|
28
|
-
Can also be enabled with the ``DD_BOTOCORE_DISTRIBUTED_TRACING`` environment variable.
|
29
|
-
|
30
|
-
Example::
|
31
|
-
|
32
|
-
from ddtrace import config
|
33
|
-
|
34
|
-
# Enable distributed tracing
|
35
|
-
config.botocore['distributed_tracing'] = True
|
36
|
-
|
37
|
-
|
38
|
-
Default: ``True``
|
39
|
-
|
40
|
-
|
41
|
-
.. py:data:: ddtrace.config.botocore['invoke_with_legacy_context']
|
42
|
-
|
43
|
-
This preserves legacy behavior when tracing directly invoked Python and Node Lambda
|
44
|
-
functions instrumented with datadog-lambda-python < v41 or datadog-lambda-js < v3.58.0.
|
45
|
-
|
46
|
-
Legacy support for older libraries is available with
|
47
|
-
``ddtrace.config.botocore.invoke_with_legacy_context = True`` or by setting the environment
|
48
|
-
variable ``DD_BOTOCORE_INVOKE_WITH_LEGACY_CONTEXT=true``.
|
49
|
-
|
50
|
-
|
51
|
-
Default: ``False``
|
52
|
-
|
53
|
-
|
54
|
-
.. py:data:: ddtrace.config.botocore['operations'][<operation>].error_statuses = "<error statuses>"
|
55
|
-
|
56
|
-
Definition of which HTTP status codes to consider for making a span as an error span.
|
57
|
-
|
58
|
-
By default response status codes of ``'500-599'`` are considered as errors for all endpoints.
|
59
|
-
|
60
|
-
Example marking 404, and 5xx as errors for ``s3.headobject`` API calls::
|
61
|
-
|
62
|
-
from ddtrace import config
|
63
|
-
|
64
|
-
config.botocore['operations']['s3.headobject'].error_statuses = '404,500-599'
|
65
|
-
|
66
|
-
|
67
|
-
See :ref:`HTTP - Custom Error Codes<http-custom-error>` documentation for more examples.
|
68
|
-
|
69
|
-
.. py:data:: ddtrace.config.botocore['tag_no_params']
|
70
|
-
|
71
|
-
This opts out of the default behavior of collecting a narrow set of API parameters as span tags.
|
72
|
-
|
73
|
-
To not collect any API parameters, ``ddtrace.config.botocore.tag_no_params = True`` or by setting the environment
|
74
|
-
variable ``DD_AWS_TAG_NO_PARAMS=true``.
|
75
|
-
|
76
|
-
|
77
|
-
Default: ``False``
|
78
|
-
|
79
|
-
|
80
|
-
.. py:data:: ddtrace.config.botocore['instrument_internals']
|
81
|
-
|
82
|
-
This opts into collecting spans for some internal functions, including ``parsers.ResponseParser.parse``.
|
83
|
-
|
84
|
-
Can also be enabled with the ``DD_BOTOCORE_INSTRUMENT_INTERNALS`` environment variable.
|
85
|
-
|
86
|
-
Default: ``False``
|
87
|
-
|
88
|
-
|
89
|
-
.. py:data:: ddtrace.config.botocore['span_prompt_completion_sample_rate']
|
90
|
-
|
91
|
-
Configure the sample rate for the collection of bedrock prompts and completions as span tags.
|
92
|
-
|
93
|
-
Alternatively, you can set this option with the ``DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE`` environment
|
94
|
-
variable.
|
95
|
-
|
96
|
-
Default: ``1.0``
|
97
|
-
|
98
|
-
|
99
|
-
.. py:data:: (beta) ddtrace.config.botocore["span_char_limit"]
|
100
|
-
|
101
|
-
Configure the maximum number of characters for bedrock span tags for prompt/response text.
|
102
|
-
|
103
|
-
Text exceeding the maximum number of characters is truncated to the character limit
|
104
|
-
and has ``...`` appended to the end.
|
105
|
-
|
106
|
-
Alternatively, you can set this option with the ``DD_BEDROCK_SPAN_CHAR_LIMIT`` environment
|
107
|
-
variable.
|
108
|
-
|
109
|
-
Default: ``128``
|
110
|
-
|
111
|
-
|
112
|
-
.. py:data:: ddtrace.config.botocore['dynamodb_primary_key_names_for_tables']
|
113
|
-
|
114
|
-
This enables DynamoDB API calls to be instrumented with span pointers. Many
|
115
|
-
DynamoDB API calls do not include the Item's Primary Key fields as separate
|
116
|
-
values, so they need to be provided to the tracer separately. This field
|
117
|
-
should be structured as a ``dict`` keyed by the table names as ``str``.
|
118
|
-
Each value should be the ``set`` of primary key field names (as ``str``)
|
119
|
-
for the associated table. The set may have exactly one or two elements,
|
120
|
-
depending on the Table's Primary Key schema.
|
121
|
-
|
122
|
-
In python this would look like::
|
123
|
-
|
124
|
-
ddtrace.config.botocore['dynamodb_primary_key_names_for_tables'] = {
|
125
|
-
'table_name': {'key1', 'key2'},
|
126
|
-
'other_table': {'other_key'},
|
127
|
-
}
|
128
|
-
|
129
|
-
Can also be enabled with the ``DD_BOTOCORE_DYNAMODB_TABLE_PRIMARY_KEYS``
|
130
|
-
environment variable which is parsed as a JSON object with strings for keys
|
131
|
-
and lists of strings for values.
|
132
|
-
|
133
|
-
This would look something like::
|
134
|
-
|
135
|
-
export DD_BOTOCORE_DYNAMODB_TABLE_PRIMARY_KEYS='{
|
136
|
-
"table_name": ["key1", "key2"],
|
137
|
-
"other_table": ["other_key"]
|
138
|
-
}'
|
139
|
-
|
140
|
-
Default: ``{}``
|
141
|
-
|
142
|
-
|
143
|
-
.. py:data:: ddtrace.config.botocore['add_span_pointers']
|
144
|
-
|
145
|
-
This enables the addition of span pointers to spans associated with
|
146
|
-
successful AWS API calls.
|
147
|
-
|
148
|
-
Alternatively, you can set this option with the
|
149
|
-
``DD_BOTOCORE_ADD_SPAN_POINTERS`` environment variable.
|
150
|
-
|
151
|
-
Default: ``True``
|
152
|
-
|
153
|
-
"""
|
ddtrace/contrib/_protobuf.py
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
The Protobuf integration will trace all Protobuf read / write calls made with the ``google.protobuf``
|
3
|
-
library. This integration is enabled by default.
|
4
|
-
|
5
|
-
Enabling
|
6
|
-
~~~~~~~~
|
7
|
-
|
8
|
-
The protobuf integration is enabled by default. Use
|
9
|
-
:func:`patch()<ddtrace.patch>` to enable the integration::
|
10
|
-
|
11
|
-
from ddtrace import patch
|
12
|
-
patch(protobuf=True)
|
13
|
-
|
14
|
-
Configuration
|
15
|
-
~~~~~~~~~~~~~
|
16
|
-
|
17
|
-
"""
|
ddtrace/contrib/_pytest.py
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
The pytest integration traces test executions.
|
3
|
-
|
4
|
-
Enabling
|
5
|
-
~~~~~~~~
|
6
|
-
|
7
|
-
Enable traced execution of tests using ``pytest`` runner by
|
8
|
-
running ``pytest --ddtrace`` or by modifying any configuration
|
9
|
-
file read by pytest (``pytest.ini``, ``setup.cfg``, ...)::
|
10
|
-
|
11
|
-
[pytest]
|
12
|
-
ddtrace = 1
|
13
|
-
|
14
|
-
|
15
|
-
If you need to disable it, the option ``--no-ddtrace`` will take
|
16
|
-
precedence over ``--ddtrace`` and (``pytest.ini``, ``setup.cfg``, ...)
|
17
|
-
|
18
|
-
You can enable all integrations by using the ``--ddtrace-patch-all`` option
|
19
|
-
alongside ``--ddtrace`` or by adding this to your configuration::
|
20
|
-
|
21
|
-
[pytest]
|
22
|
-
ddtrace = 1
|
23
|
-
ddtrace-patch-all = 1
|
24
|
-
|
25
|
-
|
26
|
-
.. note::
|
27
|
-
The ddtrace plugin for pytest has the side effect of importing the ddtrace
|
28
|
-
package and starting a global tracer.
|
29
|
-
|
30
|
-
If this is causing issues for your pytest runs where traced execution of
|
31
|
-
tests is not enabled, you can deactivate the plugin::
|
32
|
-
|
33
|
-
[pytest]
|
34
|
-
addopts = -p no:ddtrace
|
35
|
-
|
36
|
-
See the `pytest documentation
|
37
|
-
<https://docs.pytest.org/en/7.1.x/how-to/plugins.html#deactivating-unregistering-a-plugin-by-name>`_
|
38
|
-
for more details.
|
39
|
-
|
40
|
-
|
41
|
-
Global Configuration
|
42
|
-
~~~~~~~~~~~~~~~~~~~~
|
43
|
-
|
44
|
-
.. py:data:: ddtrace.config.pytest["service"]
|
45
|
-
|
46
|
-
The service name reported by default for pytest traces.
|
47
|
-
|
48
|
-
This option can also be set with the integration specific ``DD_PYTEST_SERVICE`` environment
|
49
|
-
variable, or more generally with the `DD_SERVICE` environment variable.
|
50
|
-
|
51
|
-
Default: Name of the repository being tested, otherwise ``"pytest"`` if the repository name cannot be found.
|
52
|
-
|
53
|
-
|
54
|
-
.. py:data:: ddtrace.config.pytest["operation_name"]
|
55
|
-
|
56
|
-
The operation name reported by default for pytest traces.
|
57
|
-
|
58
|
-
This option can also be set with the ``DD_PYTEST_OPERATION_NAME`` environment
|
59
|
-
variable.
|
60
|
-
|
61
|
-
Default: ``"pytest.test"``
|
62
|
-
"""
|
ddtrace/contrib/_pytest_bdd.py
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
The pytest-bdd integration traces executions of scenarios and steps.
|
3
|
-
|
4
|
-
Enabling
|
5
|
-
~~~~~~~~
|
6
|
-
|
7
|
-
Please follow the instructions for enabling `pytest` integration.
|
8
|
-
|
9
|
-
.. note::
|
10
|
-
The ddtrace.pytest_bdd plugin for pytest-bdd has the side effect of importing
|
11
|
-
the ddtrace package and starting a global tracer.
|
12
|
-
|
13
|
-
If this is causing issues for your pytest-bdd runs where traced execution of
|
14
|
-
tests is not enabled, you can deactivate the plugin::
|
15
|
-
|
16
|
-
[pytest]
|
17
|
-
addopts = -p no:ddtrace.pytest_bdd
|
18
|
-
|
19
|
-
See the `pytest documentation
|
20
|
-
<https://docs.pytest.org/en/7.1.x/how-to/plugins.html#deactivating-unregistering-a-plugin-by-name>`_
|
21
|
-
for more details.
|
22
|
-
|
23
|
-
"""
|
ddtrace/contrib/_unittest.py
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
The unittest integration traces test executions.
|
3
|
-
|
4
|
-
|
5
|
-
Enabling
|
6
|
-
~~~~~~~~
|
7
|
-
|
8
|
-
The unittest integration is enabled automatically when using
|
9
|
-
:ref:`ddtrace-run<ddtracerun>` or :ref:`import ddtrace.auto<ddtraceauto>`.
|
10
|
-
|
11
|
-
Alternately, use :func:`patch()<ddtrace.patch>` to manually enable the integration::
|
12
|
-
|
13
|
-
from ddtrace import patch
|
14
|
-
patch(unittest=True)
|
15
|
-
|
16
|
-
Global Configuration
|
17
|
-
~~~~~~~~~~~~~~~~~~~~
|
18
|
-
|
19
|
-
.. py:data:: ddtrace.config.unittest["operation_name"]
|
20
|
-
|
21
|
-
The operation name reported by default for unittest traces.
|
22
|
-
|
23
|
-
This option can also be set with the ``DD_UNITTEST_OPERATION_NAME`` environment
|
24
|
-
variable.
|
25
|
-
|
26
|
-
Default: ``"unittest.test"``
|
27
|
-
|
28
|
-
.. py:data:: ddtrace.config.unittest["strict_naming"]
|
29
|
-
|
30
|
-
Requires all ``unittest`` tests to start with ``test`` as stated in the Python documentation
|
31
|
-
|
32
|
-
This option can also be set with the ``DD_CIVISIBILITY_UNITTEST_STRICT_NAMING`` environment
|
33
|
-
variable.
|
34
|
-
|
35
|
-
Default: ``True``
|
36
|
-
"""
|
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
|