Ddtrace

Latest version: v2.8.5

Safety actively analyzes 630026 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 15 of 34

0.50.4

Bug Fixes

- 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.

---

0.50.3

Bug Fixes

- Fixed the handling of sanic endpoint paths with non-string arguments.

---

0.50.2

Bug Fixes

- 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.

---

0.50.1

Bug Fixes

- 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.
- Fix pymongo 3.12.0+ spans not being generated.
- Fix a possible NoneType error in the WSGI middleware start_response method.

---

0.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>

Deprecation Notes

- The reuse of a tracer that has been shut down has been deprecated. A new tracer should be created for generating new traces.
- 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.

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.span.Span`

- `Span.context` will now return a `Context`

- `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.

New Features

- 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
- Automated context management should now work in all asynchronous frameworks that use `contextvars`.
- `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.
- 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 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.
- The pytest plugin now includes support for automatically tagging spans with parameters in parameterized tests.
- The Python heap profiler can now be enabled by setting the `DD_PROFILING_HEAP_ENABLED` environment variable to `1`.

Bug Fixes

- 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 <https://github.com/DataDog/dd-trace-py/pull/2497> for more information.
- Fix double patching of `pymongo` client topology.
- 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]`.
- 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.

Other Changes

- 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.
- The botocore integration excludes AWS endpoint call parameters that have a name ending with `Body` from the set of span tags.

---

0.49.4

Bug Fixes

- Fixes an issue when trying to manually start the runtime metrics worker:

AttributeError: module 'ddtrace.internal.runtime' has no attribute 'runtime_metrics'

- Fixes an issue with enabling the runtime worker introduced in v0.49.0 where no runtime metrics were sent to the agent.

---

Page 15 of 34

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.