Skip to content

fix(botocore): inject trace context into stepfunction start_execution input #10262

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

Conversation

agocs
Copy link
Contributor

@agocs agocs commented Aug 16, 2024

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

  • 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

github-actions bot commented Aug 16, 2024

CODEOWNERS have been resolved as:

ddtrace/contrib/internal/botocore/__init__.py                           @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/contrib/internal/botocore/constants.py                          @DataDog/apm-core-python @DataDog/apm-idm-python
releasenotes/notes/fix-botocore-stepfunction-patching-9993630697956278.yaml  @DataDog/apm-python
tests/contrib/botocore/test_stepfunctions.py                            @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/_trace/trace_handlers.py                                        @DataDog/apm-sdk-api-python
ddtrace/contrib/internal/botocore/services/stepfunctions.py             @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/botocore/test.py                                          @DataDog/apm-core-python @DataDog/apm-idm-python

@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Aug 16, 2024

Datadog Report

Branch report: chris.agocs/re-inject-trace-context-into-step-function-start-execution
Commit report: 5fcce4f
Test service: dd-trace-py

✅ 0 Failed, 134619 Passed, 8927 Skipped, 5h 16m 9.27s Total duration (1m 41.61s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Aug 16, 2024

Benchmarks

Benchmark execution time: 2024-08-27 18:44:57

Comparing candidate commit 5fcce4f in PR branch chris.agocs/re-inject-trace-context-into-step-function-start-execution with baseline commit e91736c in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 353 metrics, 47 unstable metrics.

@agocs agocs changed the title Re-add HTTP Propagator and inject trace context into stepfunction input fix(botocore):inject trace context into stepfunction start_execution input Aug 16, 2024
@agocs agocs marked this pull request as ready for review August 16, 2024 20:09
@agocs agocs requested review from a team as code owners August 16, 2024 20:09
@agocs agocs changed the title fix(botocore):inject trace context into stepfunction start_execution input fix(botocore): inject trace context into stepfunction start_execution input Aug 16, 2024
chris.agocs added 2 commits August 21, 2024 12:50
…ass the injected input object back to the patcher using context.Set/Get
…start-execution' of github.com:DataDog/dd-trace-py into chris.agocs/re-inject-trace-context-into-step-function-start-execution
@agocs agocs requested a review from emmettbutler August 21, 2024 19:52
@agocs agocs requested a review from emmettbutler August 23, 2024 20:19
Copy link
Collaborator

@emmettbutler emmettbutler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as Romain. Otherwise, this looks mergeable.

@agocs
Copy link
Contributor Author

agocs commented Aug 26, 2024

@emmettbutler Thanks! I resolved the circular dependency issue neatly, I think.

@agocs
Copy link
Contributor Author

agocs commented Aug 26, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Aug 26, 2024

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

Use /merge -c to cancel this operation!

@agocs
Copy link
Contributor Author

agocs commented Aug 26, 2024

@emmettbutler , it looks like I still need a review from DataDog/apm-sdk-api-python. Do you know anyone who could give this a look?

@dd-devflow
Copy link

dd-devflow bot commented Aug 26, 2024

⚠️ MergeQueue: This merge request was unqueued

This merge request was unqueued

If you need support, contact us on Slack #devflow!

@agocs
Copy link
Contributor Author

agocs commented Aug 27, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Aug 27, 2024

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

Use /merge -c to cancel this operation!

@dd-devflow
Copy link

dd-devflow bot commented Aug 27, 2024

🚂 MergeQueue: queue is disabled

Added to the queue but the mergequeue is not enabled for now.

Use /merge -c to cancel this operation!

@agocs
Copy link
Contributor Author

agocs commented Aug 28, 2024

/remove

@dd-devflow
Copy link

dd-devflow bot commented Aug 28, 2024

🚂 Devflow: /remove

@agocs agocs merged commit c2822c5 into main Aug 28, 2024
201 of 202 checks passed
@agocs agocs deleted the chris.agocs/re-inject-trace-context-into-step-function-start-execution branch August 28, 2024 15:41
@dd-devflow
Copy link

dd-devflow bot commented Aug 28, 2024

⚠️ MergeQueue: This merge request was unqueued

This merge request was unqueued

If you need support, contact us on Slack #devflow!

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.

4 participants