Skip to content
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

baggage max items implementation update #11421

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rachelyangdog
Copy link
Contributor

@rachelyangdog rachelyangdog commented Nov 15, 2024

Fixing baggage max items implementation based off the change in the RFC. "If baggage data exceeds one or both of these limits, APM SDKs should drop baggage name/value pairs until both conditions are met. For example, if baggage contains 70 name/value pairs, the SDK should only add 64 of them to the baggage header and drop the other 6. The W3C leaves the process of selecting which pairs to keep or drop up to implementers. The simplest algorithm in this example is to keep the first 64 pairs and drop the last 6."

Also updating the test that checks max baggage items.

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

Copy link
Contributor

CODEOWNERS have been resolved as:

ddtrace/propagation/http.py                                             @DataDog/apm-sdk-api-python
tests/tracer/test_propagation.py                                        @DataDog/apm-sdk-api-python

@rachelyangdog rachelyangdog changed the title (baggage): fixing max items implementation fixing baggage max items implementation Nov 15, 2024
@rachelyangdog rachelyangdog added the changelog/no-changelog A changelog entry is not required for this PR. label Nov 15, 2024
@rachelyangdog rachelyangdog changed the title fixing baggage max items implementation baggage max items implementation update Nov 15, 2024
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Nov 15, 2024

Datadog Report

Branch report: rachel.yang/baggage-max-items-fix
Commit report: b5aeca8
Test service: dd-trace-py

✅ 0 Failed, 132 Passed, 1246 Skipped, 2m 17.95s Total duration (34m 12.88s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Nov 15, 2024

Benchmarks

Benchmark execution time: 2024-11-15 17:40:40

Comparing candidate commit b5aeca8 in PR branch rachel.yang/baggage-max-items-fix with baseline commit 1aaed62 in branch main.

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

scenario:iast_aspects-bytearray_extend_aspect

  • 🟩 execution_time [-237.591ns; -204.545ns] or [-11.364%; -9.784%]

scenario:iast_aspects-ospathbasename_aspect

  • 🟩 execution_time [-471.074ns; -400.125ns] or [-12.248%; -10.403%]

scenario:iast_aspects-rsplit_aspect

  • 🟩 execution_time [-210.934ns; -183.958ns] or [-11.133%; -9.710%]

scenario:iast_aspects-title_aspect

  • 🟩 execution_time [-359.455ns; -312.887ns] or [-11.322%; -9.855%]

scenario:iast_aspects-upper_aspect

  • 🟩 execution_time [-250.353ns; -217.626ns] or [-8.539%; -7.422%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant