Skip to content

fix(tracer): error when encoding bytes and adding a string [backport 3.9] #13718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 18, 2025

Backport 2e13f18 from #13419 to 3.9.

fixes error when we try to concat the string 'truncated' to bytes

Checklist

  • 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
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

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

fixes error when we try to concat the string 'truncated' to bytes

## 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: Quinna Halim <[email protected]>
Co-authored-by: Brett Langdon <[email protected]>
(cherry picked from commit 2e13f18)
@github-actions github-actions bot requested review from a team as code owners June 18, 2025 23:41
@github-actions github-actions bot requested review from juanjux and duncanista June 18, 2025 23:41
@emmettbutler emmettbutler enabled auto-merge (squash) June 20, 2025 15:28
@quinna-h
Copy link
Contributor

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jun 20, 2025

View all feedbacks in Devflow UI.

2025-06-20 19:44:26 UTC ℹ️ Start processing command /merge


2025-06-20 19:44:34 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-06-20 20:40:19 UTC ⚠️ MergeQueue: This merge request was unqueued

This pull request was closed.

@quinna-h
Copy link
Contributor

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jun 20, 2025

View all feedbacks in Devflow UI.

2025-06-20 19:44:41 UTC ℹ️ Start processing command /merge


2025-06-20 19:44:44 UTC ❌ MergeQueue

PR already in the queue with status waiting

@quinna-h quinna-h closed this Jun 20, 2025
auto-merge was automatically disabled June 20, 2025 20:40

Pull request was closed

@quinna-h quinna-h reopened this Jun 20, 2025
Copy link
Contributor Author

CODEOWNERS have been resolved as:

releasenotes/notes/encode-bytes-974d93cec3725455.yaml                   @DataDog/apm-python
tests/snapshots/tests.integration.test_integration_snapshots.test_encode_span_with_large_bytes_attributes[v0.4].json  @DataDog/apm-python
tests/snapshots/tests.integration.test_integration_snapshots.test_encode_span_with_large_bytes_attributes[v0.5].json  @DataDog/apm-python
ddtrace/internal/_encoding.pyx                                          @DataDog/apm-core-python
tests/integration/test_integration_snapshots.py                         @DataDog/apm-core-python

@quinna-h quinna-h enabled auto-merge (squash) June 20, 2025 20:53
Copy link
Contributor Author

github-actions bot commented Jun 20, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 273 ± 2 ms.

The average import time from base is: 280 ± 20 ms.

The import time difference between this PR and base is: -5.0 ± 0.7 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.310 ms (0.48%)
ddtrace.bootstrap.sitecustomize 0.658 ms (0.24%)
ddtrace.bootstrap.preload 0.658 ms (0.24%)
ddtrace.internal.remoteconfig.client 0.658 ms (0.24%)
ddtrace 0.653 ms (0.24%)

@pr-commenter
Copy link

pr-commenter bot commented Jun 20, 2025

Benchmarks

Benchmark execution time: 2025-06-23 15:31:02

Comparing candidate commit a4d1e11 in PR branch backport-13419-to-3.9 with baseline commit 03c93b7 in branch 3.9.

Found 0 performance improvements and 2 performance regressions! Performance is the same for 505 metrics, 3 unstable metrics.

scenario:iastaspects-lstrip_aspect

  • 🟥 execution_time [+1.418µs; +1.506µs] or [+10.943%; +11.623%]

scenario:iastaspectsospath-ospathsplitdrive_aspect

  • 🟥 execution_time [+347.765ns; +417.705ns] or [+9.570%; +11.495%]

@quinna-h quinna-h disabled auto-merge June 20, 2025 22:37
@quinna-h quinna-h enabled auto-merge (squash) June 20, 2025 22:37
@quinna-h
Copy link
Contributor

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jun 23, 2025

View all feedbacks in Devflow UI.

2025-06-23 15:09:17 UTC ℹ️ Start processing command /merge


2025-06-23 15:09:43 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-06-23 15:32:16 UTC ℹ️ MergeQueue: This merge request was already merged

This pull request was merged directly.

@quinna-h quinna-h merged commit 593d5d5 into 3.9 Jun 23, 2025
831 of 834 checks passed
@quinna-h quinna-h deleted the backport-13419-to-3.9 branch June 23, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants