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

chore(botocore): refactor kinesis module #8937

Merged
merged 9 commits into from
Apr 15, 2024

Conversation

emmettbutler
Copy link
Collaborator

@emmettbutler emmettbutler commented Apr 10, 2024

This change refactors the kinesis module to use the core API instead of calling start_span directly in at least one instance.

Checklist

  • Change(s) are motivated and described in the PR description
  • Testing strategy is described if automated tests are not included in the PR
  • Risks are described (performance impact, potential for breakage, maintainability)
  • Change is maintainable (easy to change, telemetry, documentation)
  • Library release note guidelines are followed or label changelog/no-changelog is set
  • Documentation is included (in-code, generated user docs, public corp docs)
  • Backport labels are set (if applicable)
  • If this PR changes the public interface, I've notified @DataDog/apm-tees.

Reviewer Checklist

  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Description motivates each change
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Change is maintainable (easy to change, telemetry, documentation)
  • Release note makes sense to a user of the library
  • 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

@emmettbutler emmettbutler requested review from a team as code owners April 10, 2024 20:40
@emmettbutler emmettbutler requested review from brettlangdon and removed request for a team April 10, 2024 20:40
@emmettbutler emmettbutler marked this pull request as draft April 10, 2024 20:40
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Apr 10, 2024

Datadog Report

Branch report: emmett.butler/botocore-abstraction-kinesis
Commit report: 33585e3
Test service: dd-trace-py

✅ 0 Failed, 10400 Passed, 158712 Skipped, 3h 49m 13.82s Total duration (5h 40m 30.66s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Apr 10, 2024

Benchmarks

Benchmark execution time: 2024-04-10 21:43:01

Comparing candidate commit a4abdde in PR branch emmett.butler/botocore-abstraction-kinesis with baseline commit 30306d1 in branch emmett.butler/botocore-abstraction.

Found 6 performance improvements and 3 performance regressions! Performance is the same for 192 metrics, 9 unstable metrics.

scenario:flasksimple-appsec-get

  • 🟥 execution_time [+246.135µs; +296.736µs] or [+3.925%; +4.732%]

scenario:httppropagationextract-tracecontext_headers

  • 🟩 max_rss_usage [-739.047KB; -666.291KB] or [-3.383%; -3.050%]

scenario:httppropagationextract-wsgi_empty_headers

  • 🟩 max_rss_usage [-753.675KB; -539.022KB] or [-3.445%; -2.464%]

scenario:httppropagationextract-wsgi_invalid_span_id_header

  • 🟥 max_rss_usage [+798.342KB; +1051.002KB] or [+3.809%; +5.015%]

scenario:httppropagationextract-wsgi_large_valid_headers_all

  • 🟩 max_rss_usage [-939.920KB; -561.673KB] or [-4.290%; -2.564%]

scenario:httppropagationextract-wsgi_medium_valid_headers_all

  • 🟩 max_rss_usage [-1013.240KB; -735.343KB] or [-4.627%; -3.358%]

scenario:httppropagationextract-wsgi_valid_headers_basic

  • 🟩 max_rss_usage [-777.585KB; -623.657KB] or [-3.554%; -2.851%]

scenario:sethttpmeta-obfuscation-send-querystring-disabled

  • 🟥 max_rss_usage [+528.135KB; +784.633KB] or [+2.426%; +3.604%]

scenario:sethttpmeta-useragentvariant_not_exists_1

  • 🟩 max_rss_usage [-783.452KB; -529.726KB] or [-3.533%; -2.389%]

@emmettbutler emmettbutler changed the title refactor kinesis module chore(botocore): refactor kinesis module Apr 11, 2024
@emmettbutler emmettbutler marked this pull request as ready for review April 11, 2024 15:18
@emmettbutler emmettbutler added the changelog/no-changelog A changelog entry is not required for this PR. label Apr 11, 2024
Base automatically changed from emmett.butler/botocore-abstraction to main April 15, 2024 20:38
@emmettbutler emmettbutler enabled auto-merge (squash) April 15, 2024 20:40
@emmettbutler emmettbutler merged commit 3480c5f into main Apr 15, 2024
153 of 154 checks passed
@emmettbutler emmettbutler deleted the emmett.butler/botocore-abstraction-kinesis branch April 15, 2024 21:02
agocs added a commit that referenced this pull request Aug 28, 2024
… input (#10262)

In #7514 , I added a feature to patch start_execution calls to AWS
stepfunctions and inject trace context into the input object. That
feature suffered a regression in #8937 , and the whole stepfunctions
integration was refactored to use the Core API in #9005 . This PR
re-adds the injection of trace context into the start_execution input,
and adds a few unit tests to detect the same regression in the future.


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

2 participants