Skip to content

Tags: DataDog/dd-trace-py

Tags

v3.10.1

Toggle v3.10.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(ci_visibility): report retry number correctly with pytest-xdist […

…backport 3.10] (#13893)

Backport 8c8ea55 from #13884 to 3.10.

Currently we use the `core` context API to record the test retry number.
This does not play well with `pytest-xdist`, where the test report is
generated in a subprocess, but logged in the main process (where the
context is not available).

This PR changes it to store the retry number in the test's user
properties. Those are serialized by xdist as part of the report and sent
back to the main process, so we have access to them at logging time.

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Vítor De Araújo <[email protected]>

v3.10.0

Toggle v3.10.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(azure_functions): add messaging attributes to azure function ser…

…vice bus consumer spans (#13810)

This PR adds messaging attributes to spans generated by Azure Function
Service Bus Triggers. It also updates the minimum supported Azure
Function version to `1.10.1` since that's when the `FunctionApp` class
that is used to patch a user's functions was introduced.

### Instrumentation details:
- Span attributes added to Azure Function Service Bus Triggers
  * `messaging.destination.name: <queue/topic name>`
  * `messaging.message_id: <message id>`
  * `messaging.operation: receive`
  * `messaging.system: servicebus`

- https://datadoghq.atlassian.net/browse/SVLS-7020
-
https://github.com/Azure/azure-functions-python-library/releases/tag/1.10.1

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

v3.10.0rc3

Toggle v3.10.0rc3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(azure_functions): add messaging attributes to azure function ser…

…vice bus consumer spans (#13810)

This PR adds messaging attributes to spans generated by Azure Function
Service Bus Triggers. It also updates the minimum supported Azure
Function version to `1.10.1` since that's when the `FunctionApp` class
that is used to patch a user's functions was introduced.

### Instrumentation details:
- Span attributes added to Azure Function Service Bus Triggers
  * `messaging.destination.name: <queue/topic name>`
  * `messaging.message_id: <message id>`
  * `messaging.operation: receive`
  * `messaging.system: servicebus`

- https://datadoghq.atlassian.net/browse/SVLS-7020
-
https://github.com/Azure/azure-functions-python-library/releases/tag/1.10.1

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

v3.10.0rc2

Toggle v3.10.0rc2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore(ci): riotize appsec_integrations_flask (#13833)

## Checklist
- [X] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Signed-off-by: Juanjo Alvarez <[email protected]>

v3.10.0rc1

Toggle v3.10.0rc1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
ci: update one pipeline reference (#13750)

Update the reference to the one pipeline 
## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

v3.9.4

Toggle v3.9.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(di): interaction with external wrapping contexts [backport 3.9] (#…

…13741)

Backport c02a068 from #13586 to 3.9.

We fix an incompatibility within the interaction between Dynamic
Instrumentation and external wrapping context (e.g. Code Origin). This
was due to a loss of link between a function and its original code
object due to a wrapping context being wrapped on a function not
retrieved via the function discovery machinery. We make sure that any
wrapping via wrapping context preserves the link between the function
and its original code object. With the universal wrapping context
mechanism, we don't have to worry about potential multiple wrapping, as
bytecode is modified only once.

Refs: DEBUG-3970

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Gabriele N. Tornetta <[email protected]>

v3.9.3

Toggle v3.9.3's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
perf(rc): improve performance of subprocess service sharing [backport…

… 3.9] (#13685)

Backport b686305 from #13651 to 3.9.

This change will only write service names to the shared file queue only
if we have not shared that service name yet.

This improvement avoids locking and writing to disk every time we call
Pin.onto which can happen a lot when database connections are
cycled/recreated frequently.

It also helps ensure that the same process doesn't continually write the
same service name to the same file over and over again.

I also updated the tests to use subprocesses/forking as is expected with
it's behavior for RC.

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Brett Langdon <[email protected]>
Co-authored-by: Christophe Papazian <[email protected]>

v3.9.2

Toggle v3.9.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: avoid prematurely exhausting wrapped generators during stack unw…

…inding [backport 3.9] (#13694)

Backport a4c9ba0 from #13661 to 3.9.

This change resolves an issue wherein `tracer.wrap` on a generator
function that yields another generator when called changed the relative
ordering of generator exhaustion and exception handling calls in the
middle of the stack. This behavior caused applications upgrading from
3.7.0 to 3.9.0 to experience a change in behavior that relied on this
relative ordering.

In short, this bug existed because `for v in g: yield v` was used where
`yield from g` was needed. See PEP380 for explanation of why they're not
the same thing https://peps.python.org/pep-0380/#formal-semantics

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Emmett Butler <[email protected]>

v3.9.1

Toggle v3.9.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(llmobs): make sure correct llmobs trace id is returned from `expo…

…rt_span` [backport 3.9] (#13622)

Backport f5bed1c from #13620 to 3.9.

We recently changed how we record our LLMObs trace IDs - from APM trace
IDs to new randomly generated ones. However, we missed updating
`export_span`. This PR ensures we export the correct trace ID from
`export_span`.

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

Co-authored-by: Sam Brenner <[email protected]>

v3.9.0

Toggle v3.9.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore(ci): move slotscheck and conftest CI steps to riot (#13591)

Let's get back those sweet 5*2 minutes for "configuring project in dev
mode" multiplied by many PRs and retries.

## Checklist
- [X] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Signed-off-by: Juanjo Alvarez <[email protected]>