WhiteSource Renovate
This PR contains the following updates:
Release Notes
DataDog/dd-trace-py
Compare Source
Bug Fixes
- Fixes parsing of
botocore
env variables to ensure they are parsed as booleans.
- Ensure tornado spans are marked as an error if the response status code is 500 <= x < 600.
Compare Source
Bug Fixes
- Fix memory leak caused when the tracer is disabled.
Compare Source
0.55.2
Bug Fixes
- Set the correct package name in the Pyramid instrumentation. This should
fix an issue where the incorrect package name was being used which would
crash the application when trying to do relative imports within Pyramid
(e.g. when including routes from a relative path).
Compare Source
0.55.1
Bug Fixes
- Fix Pyramid caller_package level issue which resulted in crashes when starting Pyramid applications. Level now left at default (2).
Compare Source
Release Notes
New Features
- Add official support for Python 3.10
- Add aredis support >= 1.1.0
- Add automatic unix domain socket detection for Dogstatsd. The expected path for the socket is
/var/run/datadog/dsd.socket
which if exists, will be used instead of the previous UDP default, udp://localhost:8125/
. To be used in conjunction with dogstatsd_socket
in your datadog.yaml
file, or the DD_DOGSTATSD_SOCKET
environment variable set on the Datadog agent.
- Add new
DD_TRACE_SAMPLING_RULES
environment variable to override default sampling rules. For example: DD_TRACE_SAMPLING_RULES='[{"sample_rate":0.5,"service":"my-service"}]'
- Add support for snowflake-connector-python >= 2.0.0. Note that this integration is in beta and is not enabled by default. See the snowflake integration documentation for how to enable.
- Only for CI Visibility (
pytest
integration): include pytest
version as a tag in the test span.
- Only for CI Visibility (
pytest
integration): Extract stage and job name from environment data in Azure Pipelines.
Upgrade Notes
- Instead of using error constants from
ddtrace.ext.errors
. Use constants from ddtrace.constants
module. For example: ddtrace.ext.errors.ERROR_MSG
-> ddtrace.constants.ERROR_MSG
- Instead of using priority constants from
ddtrace.ext.priority
. Use constants from ddtrace.constants
module. For example: ddtrace.ext.priority.AUTO_KEEP
-> ddtrace.constants.AUTO_KEEP
- Instead of using system constants from
ddtrace.ext.system
. Use constants from ddtrace.constants
module. For example: ddtrace.ext.system.PID
-> ddtrace.constants.PID
Deprecation Notes
-
Deprecate DATADOG_TRACE_AGENT_HOSTNAME, DATADOG_TRACE_AGENT_PORT, DATADOG_PRIORITY_SAMPLING, DATADOG_PATCH_MODULES in favor of their DD equivalents.
[Deprecated environment variable] | [Recommended environment variable]
- For
DATADOG_TRACE_AGENT_HOSTNAME
, use DD_AGENT_HOST
- For
DATADOG_TRACE_AGENT_PORT
use DD_AGENT_PORT
- For
DATADOG_PRIORITY_SAMPLING
, follow ingestion controls
- For
DATADOG_PATCH_MODULES
, use DD_PATCH_MODULES
-
Moved ddtrace.ext.errors
constants into the ddtrace.constants
module. ddtrace.ext.errors
will be removed in v1.0. Shorthand error constant (MSG,TYPE,STACK) in ddtrace.ext.errors
will be removed in v1.0. Function get_traceback()
in ddtrace.ext.errors is now deprecated and will be removed v1.0.
-
Moved ddtrace.ext.priority
constants into ddtrace.constants
module.
-
Moved ddtrace.ext.system
constants into ddtrace.constants
module.
Bug Fixes
- Fixes an issue where all Django function middleware will share the same resource name.
- Fixed an issue with gevent worker processes that caused them to crash and stop.
- Fixes exceptions raised when logging during tracer initialization when
DD_LOGS_INJECTION
is enabled.
- The
ddtrace.utils.wrappers.unwrap
function now raises an error if trying to unwrap a non-wrapped object.
- Only for CI Visibility (
pytest
integration): Fix extraction of branch in GitLab CI.
Compare Source
Bug Fixes
- Fixed an issue with gevent worker processes that caused them to crash and stop.
- Fixes exceptions raised when logging during tracer initialization when
DD_LOGS_INJECTION
is enabled.
Compare Source
Release Notes
v0.54.0
New Features
- Add automatic unix domain socket detection for traces. The expected path for the socket is
/var/run/datadog/apm.socket
which if exists, will be used instead of the previous http default, http://localhost:8126/
. To be used in conjunction with apm_config.receiver_socket
in your datadog.yaml
file, or the DD_APM_RECEIVER_SOCKET
environment variable set on the Datadog agent.
- Update the --info command to be easier to read and provide more helpful information.
- Add support for
DD_PROFILING_ENDPOINT_COLLECTION_ENABLED
env variable to disable endpoint name collection in profiler.
- Add rq integration.
- Tag traces with HTTP headers specified on the
DD_TRACE_HEADER_TAGS
environment variable. Value must be either comma or space separated. e.g. Host:http.host,User-Agent,http.user_agent
or referer:http.referer Content-Type:http.content_type
.
Deprecation Notes
- Deprecate the DATADOG_ENV environment variable in favor of DD_ENV. The use of DD_ENV should follow Unified Service Tagging recommendations.
Bug Fixes
- pytest: report exception details directly instead of through a RuntimeWarning exception.
- Fixed the support for Celery workers that fork sub-processes with Python 3.6 and earlier versions.
- Fix the reporting of the allocated memory and the number of allocations in the profiler.
- Fixes cases in which the
test.status
tag of a test span from pytest
would be missing because pytest_runtest_makereport
hook is not run, like when pytest
has an internal error.
- Pin
protobuf
version to <3.18
for Python <=3.5 due to support being dropped.
- Make sure that correct endpoint name collected for profiling.
Other Notes
- Added runtime metrics status and sampling rules to start-up logs.
Compare Source
Bug Fixes
- Fixes an issue where all Django function middleware will share the same resource name.
Compare Source
Bug Fixes
- Fix the reporting of the allocated memory and the number of allocations in the profiler.
Compare Source
Bug Fixes
- Fixed the support for Celery workers that fork sub-processes with Python 3.6 and earlier versions.
- Fixes cases in which the
test.status
tag of a test span from pytest
would be missing because pytest_runtest_makereport
hook is not run, like when pytest
has an internal error.
- Pin
protobuf
version to <3.18
for Python <=3.5 due to support being dropped.
Compare Source
Release Notes
v0.53.0
New Features
- Tag traces with HTTP headers specified on the
DD_TRACE_HEADER_TAGS
environment variable. Value must be either comma or space separated. e.g. Host:http.host,User-Agent,http.user_agent
or referer:http.referer Content-Type:http.content_type
.
- The gevent tasks are now tracked by the threading lock events
Bug Fixes
- pytest: report exception details directly instead of through a RuntimeWarning exception.
- Fixes an issue where a manually set
django.request
span resource would get overwritten by the integration.
- Pin
setup_requires
dependency setuptools_scm[toml]>=4,<6.1
to avoid breaking changes.
Compare Source
v0.52.1
Bug Fixes
- Pin
setup_requires
dependency setuptools_scm[toml]>=4,<6.1
to avoid breaking changes.
Compare Source
Release Notes
0.52.0
New Features
- The
ddtrace.Tracer.get_log_correlation_context
method has been added to replace ddtrace.helpers.get_correlation_ids
. It now returns a dictionary which includes the current span's trace and span ids, as well as the configured service, version, and environment names.
- Add tracing support for the
httpx
library. Supported versions >=0.14.0
.
- ASGI: store the ASGI span in the scope. The span can be retrieved with the
ddtrace.contrib.asgi.span_from_scope
function.
- Submit runtime metrics as distribution metrics instead of gauge metrics.
- Support flask-caching (>= 1.10.0) with the Flask-Cache tracer.
- Only for CI Visibility (
pytest
integration): It is now possible to specify any of the following git metadata through environment variables:
DD_GIT_REPOSITORY_URL
: The url of the repository where the code is stored
DD_GIT_TAG
: The tag of the commit, if it has one
DD_GIT_BRANCH
: The branch where this commit belongs to
DD_GIT_COMMIT_SHA
: The commit hash of the current code
DD_GIT_COMMIT_MESSAGE
: Commit message
DD_GIT_COMMIT_AUTHOR_NAME
: Commit author name
DD_GIT_COMMIT_AUTHOR_EMAIL
: Commit author email
DD_GIT_COMMIT_AUTHOR_DATE
: The commit author date (ISO 8601)
DD_GIT_COMMIT_COMMITTER_NAME
: Commit committer name
DD_GIT_COMMIT_COMMITTER_EMAIL
: Commit committer email
DD_GIT_COMMIT_COMMITTER_DATE
: The commit committer date (ISO 8601)
Bug Fixes
- ASGI: handle decoding errors when extracting headers for trace propagation.
- Corrected some typing annotations for PEP 484 compliance
- Django: add support for version 3.1+ ASGI applications. A different codepath is taken for requests starting in Django 3.1 which led to the top level span not being generated for requests. The fix introduces automatic installation of the ASGI middleware to trace Django requests.
- dogpile.cache: handle both kwargs and args in the wrapper functions (using only kwargs would result in an IndexError).
- Fixes an issue with the Django integration where if the
urlconf
changes at any point during the handling of the request then the resource name will only be <METHOD> 404
. This fix moves resource name resolution to the end of the request.
- Fixes error with tagging non-string Flask view args.
werkzeug.exceptions.NotFound
404 errors are no longer raised and logged as a server error in the Flask integration.
- Fixes type hinting for
**patch_modules
parameter for patch
/patch_all
functions.
- Fixes an issue when using the pytest plugin with doctest which raises an
AttributeError
on DoctestItem
.
- Fixes a bug in the pytest plugin where xfail test cases in a test file with a module-wide skip raises attribute errors and are marked as xfail rather than skipped.
- Fixed the handling of sanic endpoint paths with non-string arguments.
- opentracer: don't override default tracing config for the
ENABLED
, AGENT_HOSTNAME
,AGENT_HTTPS
or AGENT_PORT
settings.
Compare Source
Release Notes
0.51.2
Bug Fixes
- ASGI: handle decoding errors when extracting headers for trace propagation.
- Corrected some typing annotations for PEP 484 compliance
- Django: add support for version 3.1+ ASGI applications. A different codepath is taken for requests starting in Django 3.1 which led to the top level span not being generated for requests. The fix introduces automatic installation of the ASGI middleware to trace Django requests.
- Fixes error with tagging non-string Flask view args.
- Fixes type hinting for
**patch_modules
parameter for patch
/patch_all
functions.
- Fixes a bug in the pytest plugin where xfail test cases in a test file with a module-wide skip raises attribute errors and are marked as xfail rather than skipped.
Compare Source
Release Notes
0.51.1
- Include the
py.typed
file to enable mypy type checking with ddtrace
.
Compare Source
Release Notes
v0.51.0
Upgrade Notes
- The legacy Django configuration method (deprecated in 0.34) has been removed.
- botocore: Update trace propagation format for directly invoked Lambda functions. This breaks compatibility with Lambda functions instrumented with datadog-lambda-python < v41 or datadog-lambda-js < v3.57.0. Please upgrade datadog-lambda-* in invoked lambda functions, or engage legacy compatibility mode in one of two ways:
- ddtrace.config.botocore.invoke_with_legacy_context = True
- DD_BOTOCORE_INVOKE_WITH_LEGACY_CONTEXT=true
Bug Fixes
- opentracer: don't override default tracing config for the ENABLED,\ AGENT_HOSTNAME, AGENT_HTTPS or AGENT_PORT settings.
- Fixed JSON encoding errors in the pytest plugin for parameterized tests with dictionary parameters with tuple keys. The pytest plugin now always JSON encodes the string representations of test parameters.
- Fix a possible NoneType error in the WSGI middleware start_response method.
- Fixes an issue with enabling the runtime worker introduced in v0.49.0 where no runtime metrics were sent to the agent.
- Fix pymongo 3.12.0+ spans not being generated.
New Features
- Added support for
aiopg~=0.16.0
.
- Add MariaDB integration.
- The profiler now exports active tasks for CPU and wall time profiles.
- Added support for
jinja2~=3.0.0
.
- The pytest integration now uses the name of the repository being tested as the default test service name.
Deprecation Notes
- Removed the
collect_metrics
argument from Tracer.configure
. See the release notes for v0.49.0 for the migration instructions.
monkey.patch_module
is deprecated.
monkey.get_patch_module
is deprecated.
Compare Source
Release Notes
0.50.4
Bug Fixes
- Fixes the pytest plugin from wrongly marking skipped XFail test cases as XFail. Skipped XFail tests are now marked as skipped test cases.
Compare Source
Release Notes
0.50.3
Bug Fixes
- Fixed the handling of sanic endpoint paths with non-string arguments.
Compare Source
Release Notes
0.50.2
Bug Fixes
- Fixed JSON encoding errors in the pytest plugin for parameterized tests with dictionary parameters with tuple (non-basic) key types. The pytest plugin now always JSON encodes the string representations of test parameters.
Compare Source
Release Notes
0.50.1
Bug Fixes
- Fix pymongo 3.12.0+ spans not being generated.
- Fix a possible NoneType error in the WSGI middleware start_response method.
- Fixed JSON encoding errors in the pytest plugin for parameterized tests with complex Python object parameters.
The pytest plugin now defaults to encoding the string representations of non-JSON serializable test parameters.
Compare Source
Release Notes
v0.50.0
Prelude
Major changes to context management. See the upgrade section for the specifics. Note that only advanced users of the library should be affected by these changes. For the details please refer to the Context section of the docs: https://ddtrace.readthedocs.io/en/v0.50.0/advanced_usage.html
Upgrade Notes
-
ddtrace.contrib.asyncio
AsyncioContextProvider
can now return and activate None
, Span
or Context
objects.
-
ddtrace.contrib.gevent
GeventContextProvider
can now return and activate None
, Span
or Context
objects.
-
ddtrace.contrib.tornado
TracerStackContext
can now return and activate None
, Span
or Context
objects.
-
ddtrace.context.Context
no longer maintains the active/current span state.
-
get_current_root_span()
has been removed. Use tracer.current_root_span()
instead.
-
get_current_span()
has been removed. Use tracer.current_span()
instead.
-
add_span()
has been removed. To activate a span in an execution use tracer.context_provider.activate()
instead.
-
close_span()
has been removed. To deactivate a span in an execution use tracer.context_provider.activate()
instead.
-
ddtrace.provider.BaseContextProvider
active()
now returns None
, Span
or Context
objects.
activate()
now accepts None
, Span
or Context
objects.
-
ddtrace.tracer.Tracer
tracer.get_call_context()
will now return a one-off Context
reference. This is to maintain backwards compatibility with the API but the functionality differs slightly.
tracer.start_span()
passing a span.context
for child_of
no longer adds the strong _parent
reference to the new span.
-
Support for MySQL-python has been removed.
-
Support for psycopg < 2.7 has been removed.
Bug Fixes
-
Fixes an issue with enabling the runtime worker introduced in v0.49.0 where no runtime metrics were sent to the agent.
-
Fixed the handling of the Django template name tag causing type errors.
-
Fixes an issue when trying to manually start the runtime metrics worker:
AttributeError: module 'ddtrace.internal.runtime' has no attribute 'runtime_metrics'
-
sanic: update instrumentation to support version 21.
-
Performance of the Celery integration has been improved.
-
Fix runtime-id and system.pid tags not being set on distributed traces.
-
The shutdown task is re-registered when a tracer is reused after it has been shut down.
-
Fixed the optional argument of Span.finish
to Optional[float]
instead of Optional[int]
.
-
The OpenTracing tracer.start_span
method no longer activates spans.
-
Datadog active spans will no longer take precedence over OpenTracing active spans.
-
django: fix a bug where multiple database backends would not be instrumented.
-
django: fix a bug when postgres query is composable sql object.
-
A possible memory leak that occurs when tracing across a fork has been fixed. See #2497 for more information.
-
Fix double patching of pymongo
client topology.
New Features
-
Automated context management should now work in all asynchronous frameworks that use contextvars
.
-
The Python heap profiler can now be enabled by setting the DD_PROFILING_HEAP_ENABLED
environment variable to 1
.
-
The pytest plugin now includes support for automatically tagging spans with parameters in parameterized tests.
-
Add new environment variables to configure the internal trace writer.
DD_TRACE_WRITER_MAX_BUFFER_SIZE
, DD_TRACE_WRITER_INTERVAL_SECONDS
, DD_TRACE_WRITER_MAX_PAYLOAD_SIZE_BYTES
-
The exception profiler now gathers and exports the traces and spans information.
-
Add new DD_TRACE_AGENT_TIMEOUT_SECONDS
to override the default connection timeout used when sending data to the trace agent. The default is 2.0
seconds.
-
The CI tagging for the pytest plugin now includes OS and Python Runtime metadata including system architecture, platform, version, and Python runtime name and version.
-
Add DD_CALL_BASIC_CONFIG={true,false}
environment variable to control whether ddtrace
calls logging.basicConfig
. By default when using ddtrace-run
or running in debug mode logging.basicConfig
is called to ensure there is always a root handler. This has compatibility issues for some logging configurations. DD_CALL_BASIC_CONFIG=false
can be used to skip calling logging.basicConfig
. The default value is true
to maintain existing behavior.
-
agent: support URL with a base path
-
tracer.start_span()
now accepts an activate
argument (default False
) to allow manual context management.
-
tracer.current_trace_context()
has been added to be used to access the trace context of the active trace.
-
A warning has been added to alert when gevent monkey patching is done after ddtrace has been imported.
-
Add support for Flask 2.
-
Added retry logic to the tracer to mitigate potential networking issues, like timeouts or dropped connections.
Other Notes
- The botocore integration excludes AWS endpoint call parameters that have a name ending with
Body
from the set of span tags.
- The pytest plugin now includes git metadata tags including author name and email as well as commit message from CI provider environments.
- The profiler won't be ignoring its own resource usage anymore and will report it in the profiles.
Deprecation Notes
- The deprecated dbapi2 configuration has been removed. The integration-specific configuration should be used instead. Look at the v0.48.0 release notes for migration instructions.
- The reuse of a tracer that has been shut down has been deprecated. A new tracer should be created for generating new traces.
Compare Source
Release Notes
0.49.4
Bug Fixes
Compare Source
Release Notes
0.49.3
Bug Fixes
- django: fix a bug where multiple database backends would not be instrumented.
- django: fix a bug when postgres query is composable sql object.
Compare Source
Release Notes
v0.49.2
Bug Fixes
- Fix double patching of
pymongo
client topology.
Compare Source
Release Notes
v0.49.1
New Features
Compare Source
Release Notes
v0.49.0
Prelude
Several deprecations have been made to Context
as we prepare to move active span management out of this class.
New Features
- The futures integration is now enabled by default.
- requests: add global config support. This enables the requests service name to be configured with
ddtrace.config.requests['service']
or the DD_REQUESTS_SERVICE
environment variable.
Upgrade Notes
- Support for aiohttp previous to 2.0 has been removed.
- Support for deprecated
DD_PROFILING_API_URL
environment variable has been removed. Use DD_SITE
instead.
- Support for deprecated
DD_PROFILING_API_KEY
environment variable has been removed. Use DD_API_KEY
instead.
- Profiling support for agentless mode must now be explicitly enabled.
- The ddtrace pytest plugin can now label spans from test cases marked xfail with the tag "pytest.result" and the reason for being marked xfail under the tag "pytest.xfail.reason".
- requests: spans will no longer inherit the service name from the parent.
- The return value of
Span.pprint()
has been changed to a single line in the tracer debug logs rather than the previous custom multiline format.
- Spans are now processed per tracer instance. Formerly spans were stored per-Context which could be shared between tracer instances. Note that context management is not affected. Tracers will still share active spans.
- Spans from asynchronous executions (asyncio, gevent, tornado) will now be processed and flushed together. Formerly the spans were handled per-task.
tracer.write()
will no longer have filters applied to the spans passed to it.
- The function
ddtrace.utils.merge_dicts
has been removed.
Deprecation Notes
Context.clone
is deprecated. It will not be required in 0.50.
Context.add_span
is deprecated and will be removed in 0.50.
Context.add_span
is deprecated and will be removed in 0.50.
Context.close_span
is deprecated and will be removed in 0.50.
Context.get_current_span
is deprecated and will be removed in 0.50 please use Tracer.current_span
instead.
Context.get_current_root_span
is deprecated and will be removed in 0.50 please use Tracer.current_root_span
instead.
- Deprecate the configuration of the analytics through the generic dbapi2 configuration. This should now be configured via integration configurations, for example:
Before
export DD_TRACE_DBAPI2_ANALYTICS_ENABLED=1
After
export DD_TRACE_SQLITE3_ANALYTICS_ENABLED=1
ddtrace.compat
has been deprecated and will be removed from the public API in ddtrace version 1.0.0.
- Deprecate
ddtrace.config.dbapi2
as default for TracedCursor
and TracedConnection
as well as DD_DBAPI2_TRACE_FETCH_METHODS
. Use IntegrationConfig
and DD_<INTEGRATION>_TRACE_FETCH_METHODS
specific to each dbapi-compliant library. For example:
Before
config.dbapi2.trace_fetch_methods = True
After
config.psycopg2.trace_fetch_methods = True
- The use of
ddtrace.encoding
has been deprecated and will be removed in version 1.0.0.
- The
ddtrace.http
module has been deprecated and will be removed in version 1.0.0, with the ddtrace.http.headers
module now merged into ddtrace.trace_utils
.
- The
collect_metrics
argument of the tracer.configure
method has been deprecated. Runtime metrics should be enabled only via the DD_RUNTIME_METRICS_ENABLED
environment variable.
Bug Fixes
- Fix broken builds for Python 2.7 on windows where
<stdint.h>
was not available. This change also ensures we build and publish cp27-win
wheels.
- CGroup file parsing was fixed to correctly parse container ID with preceding characters.
- grpc: handle None values for span tags.
- grpc: handle no package in fully qualified method
- grpc: Add done callback in streaming response to avoid unfinished spans if a StopIteration is never raised, as is found in the Google Cloud libraries.
- grpc: handle IPv6 addresses and no port in target.
- Fix DD_LOGS_INJECTION incompatibility when using a
logging.StrFormatStyle
(logging.Formatter(fmt, style="{")
) log formatter.
- Fixed a bug that prevented the right integration name to be used when trying to patch a module on import that is already loaded.
- Fix
urllib3
patching not properly activating the integration.
- gRPC client spans are now marked as measured by default.
- Fixes issue of unfinished spans when response is not a grpc.Future but has the same interface, as is the case with the base future class in google-api-core.
- In certain circumstances, the profiles generated in a uWSGI application could have been empty. This is now fixed and the profiler records correctly the generated events.
- The default agent timeout for profiling has been restored from 2 to 10 seconds to avoid too many profiles from being dropped.
- Fix issue with missing traces when using
pymemcache.client.hash.HashClient
.
- Added missing pymongo integration configuration, which allows overriding the service name for all the emitted spans.
Other Notes
- Added environment variable
DD_BOTTLE_DISTRIBUTED_TRACING
to enable distributed tracing for bottle.
- The
attrs
library has been unvendored and is now required as a normal Python dependency with a minimum version requirement of 19.2.0.
- The six library has been removed from vendor and the system-wide version is being used. It requires version 1.12.0 or later.
- Documentation on how to use Gunicorn with the
gevent
worker class has been added.
- Added environment variable
DD_FALCON_DISTRIBUTED_TRACING
to enable distributed tracing for falcon.
- When extracting context information from HTTP headers, a new context is created when the trace ID is either 0 or not available within the headers.
- Added environment variable
DD_PYLONS_DISTRIBUTED_TRACING
to enable distributed tracing for pylons.
- Update
pymemcache
test suite to test latest versions.
- Added
config.pyramid.distributed_tracing
setting to integration config for pyramid.
- Removed
ddtrace.ext.AppTypes
and its usages in the tracer library.
- The
ddtrace.payload
submodule has been removed.
- Added environment variable
DD_TORNADO_DISTRIBUTED_TRACING
to enable distributed tracing for tornado.
Compare Source
Release Notes
v0.48.4
Bug Fixes
- grpc: handle None values for span tags.
- grpc: Add done callback in streaming response to avoid unfinished spans if a StopIteration is never raised, as is found in the Google Cloud libraries.
Compare Source
Bug Fixes
- grpc: handle no package in fully qualified method.
- grpc: handle IPv6 addresses and no port in target.
- grpc: client spans are now marked as measured by default.
- grpc: fix issue of unfinished spans when response is not a
grpc.Future
but has the same interface, as is the case with the base future class in google-api-core
.
Compare Source
Bug Fixes
- The default agent timeout for profiling has been restored from 2 to 10 seconds to avoid too many profiles from being dropped.
Compare Source
Bug Fixes
- Fix
urllib3
patching not properly activating the integration.
- In certain circumstances, the profiles generated in a uWSGI application could have been empty. This is now fixed and the profiler records correctly the generated events.
Compare Source
New Features
- dogpile.cache is now automatically instrumented by default.
- The Pylons now supports all the standard http tagging including query string, custom error codes, and request/response headers.
- The ddtrace pytest plugin can now call
ddtrace.patch_all
via the --ddtrace-patch-all
option.
Span
now accepts a on_finish
argument used for specifying functions to call when a span finishes.
- Adds support for the Datadog Lambda Extension. The tracer will send traces to the extension by default if it is present.
- Add support for space-separated
DD_TAGS
.
- Add urllib3 integration.
Upgrade Notes
- The deprecated
dogstatsd_host
and dogstatsd_port
arguments to tracer.configure()
have been removed.
- Support for gevent 1.0 has been removed and gevent >= 1.1 is required.
- flask: deprecated configuration option
extra_error_codes
has been removed.
- The deprecated
pyddprofile
wrapper has been removed. Use ddtrace-run
with DD_PROFILING_ENABLED=1
set instead.
- A
ValueError
will now be raised on tracer initialization if the Agent URL specified to the initializer or with the environment variable DD_TRACE_AGENT_URL
is malformed.
- uWSGI is no longer supported with
ddtrace-run
due to a limitation of how tracer initialization occurs. See the updated instructions for enabling tracing in the library uWSGI documentation<uwsgi>
.
- The unused
ddtrace.api
module has been removed.
Bug Fixes
- The
Records
parameter to Firehose
endpoint calls is being excluded from the tags to avoid generating traces with a large payload.
- Tracer: fix configuring tracer with dogstatsd url.
- elasticsearch: patch versioned elasticsearch modules (elasticsearch1, ..., elasticsearch7).
- botocore: Do not assume that ResponseMeta exists in the results.
- django: handle erroneous middleware gracefully.
- The tracer now captures the task ID from the cgroups file for Fargate >= 1.4.0 and reports it to the agent as the Datadog-Container-ID tag.
- Fix a bug when tracing a mako
DefTemplate
or any Template
that does not have a filename
property.
- flask: fix a bug when the query string would contain non-Unicode characters.
- Fix a formatting issue on error exporting profiles.
- A workaround is provided for the problem with uWSGI worker processes failing to respawn. This can occur when using
ddtrace-run
for automatic instrumentation and configuration or manual instrumentation and configuration without the necessary uWSGI options. The problem is caused by how the tracer can end up starting threads in the master process before uWSGI forks to initialize the workers processes. To avoid this, we have provided updated instructions for enabling tracing in the library uWSGI documentation.
Other Notes
- The logic behind the header extraction for distributed tracing has been improved.
- The default connection timeout for the profiling agent has now been reduced from 10 to 2 seconds to match the tracer behavior.
- The tracemalloc memory profiler, which was disabled by default, has been removed.
- Query strings are stripped out from URLs by default when setting URL metadata on a span. This change affects all integrations that store HTTP metadata, like aiohttp, falcon, requests, urllib3.
Compare Source
v0.47.0
Upgrade Notes
- The profiler now automatically sets up uWSGI compatibility in auto mode or with
profile_children=True
. Make sure that you don't have custom code instrumenting the profiler in those cases.
- The
Tracer
class properties DEFAULT_HOSTNAME
, DEFAULT_PORT
, DEFAULT_DOGSTATSD_PORT
, DEFAULT_DOGSTATSD_URL
, DEFAULT_AGENT_URL
have been removed.
- elasticsearch: removed
get_traced_transport
method and ddtrace.contrib.elasticsearch.transport
module.
New Features
- cherrypy: introduce TraceMiddleware for the CherryPy web framework.
- django: tag root spans as measured.
- elasticsearch: add support for version 7.
- fastapi: add integration.
- Introduce support for the DD_SERVICE_MAPPING environment variable to allow remapping service names on emitted spans.
- httplib: distributed tracing is now enabled by default.
- The profiler now supports most operation mode from uWSGI without much configuration. It will automatically plug itself in post fork hooks when multiprocess mode is used.
- wsgi: add tracing middleware.
Bug Fixes
- Resolves an issue in Django tracing where, if
query_string
is not present in request.META, a KeyError is raised, causing the request to 500
- Deprecate the DD_LOGGING_RATE_LIMIT variable in favor of the standard DD_TRACE_LOGGING_RATE for configuring the logging rate limit.
- sampler: removed bug causing sample_rate of 0 to be reset to 1, and raise ValueError instead of logging.
- starlette: unpatch calls correctly.
- flask: fix memory leak of sampled out traces.
- Fix CPU time and wall time profiling not ignoring the profiler tasks with gevent.
Other Notes
- The default maximum CPU time used for the stack profiler (CPU time, wall time and exceptions profiling) has been decreased from 2% to 1%.
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.
Uh oh!
There was an error while loading. Please reload this page.
WhiteSource Renovate
This PR contains the following updates:
^0.46.0
->^0.55.0
Release Notes
DataDog/dd-trace-py
v0.55.4
Compare Source
Bug Fixes
botocore
env variables to ensure they are parsed as booleans.v0.55.3
Compare Source
Bug Fixes
v0.55.2
Compare Source
0.55.2
Bug Fixes
fix an issue where the incorrect package name was being used which would
crash the application when trying to do relative imports within Pyramid
(e.g. when including routes from a relative path).
v0.55.1
Compare Source
0.55.1
Bug Fixes
v0.55.0
Compare Source
Release Notes
New Features
/var/run/datadog/dsd.socket
which if exists, will be used instead of the previous UDP default,udp://localhost:8125/
. To be used in conjunction withdogstatsd_socket
in yourdatadog.yaml
file, or theDD_DOGSTATSD_SOCKET
environment variable set on the Datadog agent.DD_TRACE_SAMPLING_RULES
environment variable to override default sampling rules. For example:DD_TRACE_SAMPLING_RULES='[{"sample_rate":0.5,"service":"my-service"}]'
pytest
integration): includepytest
version as a tag in the test span.pytest
integration): Extract stage and job name from environment data in Azure Pipelines.Upgrade Notes
ddtrace.ext.errors
. Use constants fromddtrace.constants
module. For example:ddtrace.ext.errors.ERROR_MSG
->ddtrace.constants.ERROR_MSG
ddtrace.ext.priority
. Use constants fromddtrace.constants
module. For example:ddtrace.ext.priority.AUTO_KEEP
->ddtrace.constants.AUTO_KEEP
ddtrace.ext.system
. Use constants fromddtrace.constants
module. For example:ddtrace.ext.system.PID
->ddtrace.constants.PID
Deprecation Notes
Deprecate DATADOG_TRACE_AGENT_HOSTNAME, DATADOG_TRACE_AGENT_PORT, DATADOG_PRIORITY_SAMPLING, DATADOG_PATCH_MODULES in favor of their DD equivalents.
[Deprecated environment variable] | [Recommended environment variable]
DATADOG_TRACE_AGENT_HOSTNAME
, useDD_AGENT_HOST
DATADOG_TRACE_AGENT_PORT
useDD_AGENT_PORT
DATADOG_PRIORITY_SAMPLING
, follow ingestion controlsDATADOG_PATCH_MODULES
, useDD_PATCH_MODULES
Moved
ddtrace.ext.errors
constants into theddtrace.constants
module.ddtrace.ext.errors
will be removed in v1.0. Shorthand error constant (MSG,TYPE,STACK) inddtrace.ext.errors
will be removed in v1.0. Functionget_traceback()
in ddtrace.ext.errors is now deprecated and will be removed v1.0.Moved
ddtrace.ext.priority
constants intoddtrace.constants
module.Moved
ddtrace.ext.system
constants intoddtrace.constants
module.Bug Fixes
DD_LOGS_INJECTION
is enabled.ddtrace.utils.wrappers.unwrap
function now raises an error if trying to unwrap a non-wrapped object.pytest
integration): Fix extraction of branch in GitLab CI.v0.54.1
Compare Source
Bug Fixes
DD_LOGS_INJECTION
is enabled.v0.54.0
Compare Source
Release Notes
v0.54.0
New Features
/var/run/datadog/apm.socket
which if exists, will be used instead of the previous http default,http://localhost:8126/
. To be used in conjunction withapm_config.receiver_socket
in yourdatadog.yaml
file, or theDD_APM_RECEIVER_SOCKET
environment variable set on the Datadog agent.DD_PROFILING_ENDPOINT_COLLECTION_ENABLED
env variable to disable endpoint name collection in profiler.DD_TRACE_HEADER_TAGS
environment variable. Value must be either comma or space separated. e.g.Host:http.host,User-Agent,http.user_agent
orreferer:http.referer Content-Type:http.content_type
.Deprecation Notes
Bug Fixes
test.status
tag of a test span frompytest
would be missing becausepytest_runtest_makereport
hook is not run, like whenpytest
has an internal error.protobuf
version to<3.18
for Python <=3.5 due to support being dropped.Other Notes
v0.53.3
Compare Source
Bug Fixes
v0.53.2
Compare Source
Bug Fixes
v0.53.1
Compare Source
Bug Fixes
test.status
tag of a test span frompytest
would be missing becausepytest_runtest_makereport
hook is not run, like whenpytest
has an internal error.protobuf
version to<3.18
for Python <=3.5 due to support being dropped.v0.53.0
Compare Source
Release Notes
v0.53.0
New Features
DD_TRACE_HEADER_TAGS
environment variable. Value must be either comma or space separated. e.g.Host:http.host,User-Agent,http.user_agent
orreferer:http.referer Content-Type:http.content_type
.Bug Fixes
django.request
span resource would get overwritten by the integration.setup_requires
dependencysetuptools_scm[toml]>=4,<6.1
to avoid breaking changes.v0.52.1
Compare Source
v0.52.1
Bug Fixes
setup_requires
dependencysetuptools_scm[toml]>=4,<6.1
to avoid breaking changes.v0.52.0
Compare Source
Release Notes
0.52.0
New Features
ddtrace.Tracer.get_log_correlation_context
method has been added to replaceddtrace.helpers.get_correlation_ids
. It now returns a dictionary which includes the current span's trace and span ids, as well as the configured service, version, and environment names.httpx
library. Supported versions>=0.14.0
.ddtrace.contrib.asgi.span_from_scope
function.pytest
integration): It is now possible to specify any of the following git metadata through environment variables:DD_GIT_REPOSITORY_URL
: The url of the repository where the code is storedDD_GIT_TAG
: The tag of the commit, if it has oneDD_GIT_BRANCH
: The branch where this commit belongs toDD_GIT_COMMIT_SHA
: The commit hash of the current codeDD_GIT_COMMIT_MESSAGE
: Commit messageDD_GIT_COMMIT_AUTHOR_NAME
: Commit author nameDD_GIT_COMMIT_AUTHOR_EMAIL
: Commit author emailDD_GIT_COMMIT_AUTHOR_DATE
: The commit author date (ISO 8601)DD_GIT_COMMIT_COMMITTER_NAME
: Commit committer nameDD_GIT_COMMIT_COMMITTER_EMAIL
: Commit committer emailDD_GIT_COMMIT_COMMITTER_DATE
: The commit committer date (ISO 8601)Bug Fixes
urlconf
changes at any point during the handling of the request then the resource name will only be<METHOD> 404
. This fix moves resource name resolution to the end of the request.werkzeug.exceptions.NotFound
404 errors are no longer raised and logged as a server error in the Flask integration.**patch_modules
parameter forpatch
/patch_all
functions.AttributeError
onDoctestItem
.ENABLED
,AGENT_HOSTNAME
,AGENT_HTTPS
orAGENT_PORT
settings.v0.51.2
Compare Source
Release Notes
0.51.2
Bug Fixes
**patch_modules
parameter forpatch
/patch_all
functions.v0.51.1
Compare Source
Release Notes
0.51.1
py.typed
file to enable mypy type checking withddtrace
.v0.51.0
Compare Source
Release Notes
v0.51.0
Upgrade Notes
Bug Fixes
New Features
aiopg~=0.16.0
.jinja2~=3.0.0
.Deprecation Notes
collect_metrics
argument fromTracer.configure
. See the release notes for v0.49.0 for the migration instructions.monkey.patch_module
is deprecated.monkey.get_patch_module
is deprecated.v0.50.4
Compare Source
Release Notes
0.50.4
Bug Fixes
v0.50.3
Compare Source
Release Notes
0.50.3
Bug Fixes
v0.50.2
Compare Source
Release Notes
0.50.2
Bug Fixes
v0.50.1
Compare Source
Release Notes
0.50.1
Bug Fixes
The pytest plugin now defaults to encoding the string representations of non-JSON serializable test parameters.
v0.50.0
Compare Source
Release Notes
v0.50.0
Prelude
Major changes to context management. See the upgrade section for the specifics. Note that only advanced users of the library should be affected by these changes. For the details please refer to the Context section of the docs: https://ddtrace.readthedocs.io/en/v0.50.0/advanced_usage.html
Upgrade Notes
ddtrace.contrib.asyncio
AsyncioContextProvider
can now return and activateNone
,Span
orContext
objects.ddtrace.contrib.gevent
GeventContextProvider
can now return and activateNone
,Span
orContext
objects.ddtrace.contrib.tornado
TracerStackContext
can now return and activateNone
,Span
orContext
objects.ddtrace.context.Context
no longer maintains the active/current span state.get_current_root_span()
has been removed. Usetracer.current_root_span()
instead.get_current_span()
has been removed. Usetracer.current_span()
instead.add_span()
has been removed. To activate a span in an execution usetracer.context_provider.activate()
instead.close_span()
has been removed. To deactivate a span in an execution usetracer.context_provider.activate()
instead.ddtrace.provider.BaseContextProvider
active()
now returnsNone
,Span
orContext
objects.activate()
now acceptsNone
,Span
orContext
objects.ddtrace.tracer.Tracer
tracer.get_call_context()
will now return a one-offContext
reference. This is to maintain backwards compatibility with the API but the functionality differs slightly.tracer.start_span()
passing aspan.context
forchild_of
no longer adds the strong_parent
reference to the new span.Support for MySQL-python has been removed.
Support for psycopg < 2.7 has been removed.
Bug Fixes
Fixes an issue with enabling the runtime worker introduced in v0.49.0 where no runtime metrics were sent to the agent.
Fixed the handling of the Django template name tag causing type errors.
Fixes an issue when trying to manually start the runtime metrics worker:
sanic: update instrumentation to support version 21.
Performance of the Celery integration has been improved.
Fix runtime-id and system.pid tags not being set on distributed traces.
The shutdown task is re-registered when a tracer is reused after it has been shut down.
Fixed the optional argument of
Span.finish
toOptional[float]
instead ofOptional[int]
.The OpenTracing
tracer.start_span
method no longer activates spans.Datadog active spans will no longer take precedence over OpenTracing active spans.
django: fix a bug where multiple database backends would not be instrumented.
django: fix a bug when postgres query is composable sql object.
A possible memory leak that occurs when tracing across a fork has been fixed. See #2497 for more information.
Fix double patching of
pymongo
client topology.New Features
Automated context management should now work in all asynchronous frameworks that use
contextvars
.The Python heap profiler can now be enabled by setting the
DD_PROFILING_HEAP_ENABLED
environment variable to1
.The pytest plugin now includes support for automatically tagging spans with parameters in parameterized tests.
Add new environment variables to configure the internal trace writer.
DD_TRACE_WRITER_MAX_BUFFER_SIZE
,DD_TRACE_WRITER_INTERVAL_SECONDS
,DD_TRACE_WRITER_MAX_PAYLOAD_SIZE_BYTES
The exception profiler now gathers and exports the traces and spans information.
Add new
DD_TRACE_AGENT_TIMEOUT_SECONDS
to override the default connection timeout used when sending data to the trace agent. The default is2.0
seconds.The CI tagging for the pytest plugin now includes OS and Python Runtime metadata including system architecture, platform, version, and Python runtime name and version.
Add
DD_CALL_BASIC_CONFIG={true,false}
environment variable to control whetherddtrace
callslogging.basicConfig
. By default when usingddtrace-run
or running in debug modelogging.basicConfig
is called to ensure there is always a root handler. This has compatibility issues for some logging configurations.DD_CALL_BASIC_CONFIG=false
can be used to skip callinglogging.basicConfig
. The default value istrue
to maintain existing behavior.agent: support URL with a base path
tracer.start_span()
now accepts anactivate
argument (defaultFalse
) to allow manual context management.tracer.current_trace_context()
has been added to be used to access the trace context of the active trace.A warning has been added to alert when gevent monkey patching is done after ddtrace has been imported.
Add support for Flask 2.
Added retry logic to the tracer to mitigate potential networking issues, like timeouts or dropped connections.
Other Notes
Body
from the set of span tags.Deprecation Notes
v0.49.4
Compare Source
Release Notes
0.49.4
Bug Fixes
Fixes an issue when trying to manually start the runtime metrics worker:
Fixes an issue with enabling the runtime worker introduced in v0.49.0 where no runtime metrics were sent to the agent.
v0.49.3
Compare Source
Release Notes
0.49.3
Bug Fixes
v0.49.2
Compare Source
Release Notes
v0.49.2
Bug Fixes
pymongo
client topology.v0.49.1
Compare Source
Release Notes
v0.49.1
New Features
v0.49.0
Compare Source
Release Notes
v0.49.0
Prelude
Several deprecations have been made to
Context
as we prepare to move active span management out of this class.New Features
ddtrace.config.requests['service']
or theDD_REQUESTS_SERVICE
environment variable.Upgrade Notes
DD_PROFILING_API_URL
environment variable has been removed. UseDD_SITE
instead.DD_PROFILING_API_KEY
environment variable has been removed. UseDD_API_KEY
instead.Span.pprint()
has been changed to a single line in the tracer debug logs rather than the previous custom multiline format.tracer.write()
will no longer have filters applied to the spans passed to it.ddtrace.utils.merge_dicts
has been removed.Deprecation Notes
Context.clone
is deprecated. It will not be required in 0.50.Context.add_span
is deprecated and will be removed in 0.50.Context.add_span
is deprecated and will be removed in 0.50.Context.close_span
is deprecated and will be removed in 0.50.Context.get_current_span
is deprecated and will be removed in 0.50 please useTracer.current_span
instead.Context.get_current_root_span
is deprecated and will be removed in 0.50 please useTracer.current_root_span
instead.Before
After
ddtrace.compat
has been deprecated and will be removed from the public API in ddtrace version 1.0.0.ddtrace.config.dbapi2
as default forTracedCursor
andTracedConnection
as well asDD_DBAPI2_TRACE_FETCH_METHODS
. UseIntegrationConfig
andDD_<INTEGRATION>_TRACE_FETCH_METHODS
specific to each dbapi-compliant library. For example:Before
After
ddtrace.encoding
has been deprecated and will be removed in version 1.0.0.ddtrace.http
module has been deprecated and will be removed in version 1.0.0, with theddtrace.http.headers
module now merged intoddtrace.trace_utils
.collect_metrics
argument of thetracer.configure
method has been deprecated. Runtime metrics should be enabled only via theDD_RUNTIME_METRICS_ENABLED
environment variable.Bug Fixes
<stdint.h>
was not available. This change also ensures we build and publishcp27-win
wheels.logging.StrFormatStyle
(logging.Formatter(fmt, style="{")
) log formatter.urllib3
patching not properly activating the integration.pymemcache.client.hash.HashClient
.Other Notes
DD_BOTTLE_DISTRIBUTED_TRACING
to enable distributed tracing for bottle.attrs
library has been unvendored and is now required as a normal Python dependency with a minimum version requirement of 19.2.0.gevent
worker class has been added.DD_FALCON_DISTRIBUTED_TRACING
to enable distributed tracing for falcon.DD_PYLONS_DISTRIBUTED_TRACING
to enable distributed tracing for pylons.pymemcache
test suite to test latest versions.config.pyramid.distributed_tracing
setting to integration config for pyramid.ddtrace.ext.AppTypes
and its usages in the tracer library.ddtrace.payload
submodule has been removed.DD_TORNADO_DISTRIBUTED_TRACING
to enable distributed tracing for tornado.v0.48.4
Compare Source
Release Notes
v0.48.4
Bug Fixes
v0.48.3
Compare Source
Bug Fixes
grpc.Future
but has the same interface, as is the case with the base future class ingoogle-api-core
.v0.48.2
Compare Source
Bug Fixes
v0.48.1
Compare Source
Bug Fixes
urllib3
patching not properly activating the integration.v0.48.0
Compare Source
New Features
ddtrace.patch_all
via the--ddtrace-patch-all
option.Span
now accepts aon_finish
argument used for specifying functions to call when a span finishes.DD_TAGS
.Upgrade Notes
dogstatsd_host
anddogstatsd_port
arguments totracer.configure()
have been removed.extra_error_codes
has been removed.pyddprofile
wrapper has been removed. Useddtrace-run
withDD_PROFILING_ENABLED=1
set instead.ValueError
will now be raised on tracer initialization if the Agent URL specified to the initializer or with the environment variableDD_TRACE_AGENT_URL
is malformed.ddtrace-run
due to a limitation of how tracer initialization occurs. See the updated instructions for enabling tracing in the libraryuWSGI documentation<uwsgi>
.ddtrace.api
module has been removed.Bug Fixes
Records
parameter toFirehose
endpoint calls is being excluded from the tags to avoid generating traces with a large payload.DefTemplate
or anyTemplate
that does not have afilename
property.ddtrace-run
for automatic instrumentation and configuration or manual instrumentation and configuration without the necessary uWSGI options. The problem is caused by how the tracer can end up starting threads in the master process before uWSGI forks to initialize the workers processes. To avoid this, we have provided updated instructions for enabling tracing in the library uWSGI documentation.Other Notes
v0.47.0
Compare Source
v0.47.0
Upgrade Notes
profile_children=True
. Make sure that you don't have custom code instrumenting the profiler in those cases.Tracer
class propertiesDEFAULT_HOSTNAME
,DEFAULT_PORT
,DEFAULT_DOGSTATSD_PORT
,DEFAULT_DOGSTATSD_URL
,DEFAULT_AGENT_URL
have been removed.get_traced_transport
method andddtrace.contrib.elasticsearch.transport
module.New Features
Bug Fixes
query_string
is not present in request.META, a KeyError is raised, causing the request to 500Other Notes
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.