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

Adds back retry_attempts to botocore #275

Merged

Conversation

thomasdesr
Copy link
Contributor

@thomasdesr thomasdesr commented Dec 24, 2020

Description

The retry_attempts field in instrumentation-botocore previously reported how many retries it took botocore to complete an API request (e.g. if the client is rate limited).

It was lost during this refactor #150 & and I can't find any comments or issues saying it was intentionally dropped (sorry if I missed this!).

So this PR adds it back :D

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

(Lmk if you want me to add this to the changelog)

@thomasdesr thomasdesr requested review from a team, toumorokoshi and ocelotl and removed request for a team December 24, 2020 02:57
@thomasdesr thomasdesr force-pushed the thomas/botocore-retry_attempts branch from 138ee52 to b11c016 Compare December 24, 2020 02:57
Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

for now, I'd leave out "aws.retry_attempts", because it's not specific to AWS.

@@ -153,6 +153,11 @@ def _patched_api_call(self, original_func, instance, args, kwargs):
"aws.request_id", req_id,
)

if "RetryAttempts" in metadata:
span.set_attribute(
"aws.retry_attempts", metadata["RetryAttempts"],
Copy link
Member

Choose a reason for hiding this comment

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

Is aws.retry_attempts the right choice? The original code seems to just have retry_attempts.

That makes sense to me, as retry attempts, albeit behavior in AWS's boto, is not really in aws-specific construct.

retry attempts actually seems quite generic, it probably should be a semantic convention in the spec.

@thomasdesr
Copy link
Contributor Author

Thanks for taking a look! Moved back to just plain retry_attempts :D

Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! It looks great, if you could add an entry to the changelog for this, I can approve and merge.

Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks!

@thomasdesr
Copy link
Contributor Author

Thanks for the reviews & project in general :D

@codeboten codeboten merged commit 21a5c16 into open-telemetry:master Jan 6, 2021
@thomasdesr thomasdesr deleted the thomas/botocore-retry_attempts branch January 13, 2021 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants