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

xray client: return an error if the HTTP request failed #5718

Conversation

jaedle
Copy link
Contributor

@jaedle jaedle commented Jun 3, 2024

No description provided.

@jaedle jaedle requested a review from a team June 3, 2024 22:31
Copy link

linux-foundation-easycla bot commented Jun 3, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@dmathieu dmathieu changed the title Fixes #5717 xray client: return an error if the HTTP request failed Jun 4, 2024
Copy link
Member

@dmathieu dmathieu left a comment

Choose a reason for hiding this comment

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

This needs a changelog entry

samplers/aws/xray/internal/client.go Outdated Show resolved Hide resolved
samplers/aws/xray/internal/client.go Show resolved Hide resolved
@jaedle
Copy link
Contributor Author

jaedle commented Jun 4, 2024

This needs a changelog entry

I added a changelog entry, I hope that fits the current style. If not, I would appreciate suggestions, thanks!

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 66.8%. Comparing base (9207da4) to head (d572daa).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
samplers/aws/xray/internal/client.go 88.8% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #5718   +/-   ##
=====================================
  Coverage   66.8%   66.8%           
=====================================
  Files        206     206           
  Lines      13207   13211    +4     
=====================================
+ Hits        8827    8833    +6     
+ Misses      4112    4111    -1     
+ Partials     268     267    -1     
Files with missing lines Coverage Δ
samplers/aws/xray/internal/client.go 86.9% <88.8%> (+6.0%) ⬆️

@dmathieu
Copy link
Member

cc @wangzlei as the soon to be owner of this instrumentation.

@jaedle jaedle force-pushed the bug-5717-obtain-xray-sampling-rules-silent-fail branch from c18e842 to 5e6df79 Compare June 27, 2024 07:35
@jaedle
Copy link
Contributor Author

jaedle commented Jun 27, 2024

I reworked the error messages and added test cases / assertions.

Some edge cases might be hard to test / not worth the effort like creating http requests.

I hope you can find some time to review the changes or to comment if there is a need for changes. 🙏

@dmathieu
Copy link
Member

Your PR now does more than just checking for non-200 HTTP status code.
Other fixes should be in new PRs, not in this one.

@jaedle
Copy link
Contributor Author

jaedle commented Jun 27, 2024

Thanks for the feedback.

Following you gave a thumbs up on my comment above, I thought that would be appropriate.

If that’s fine for you, I would work on that within this PR.

Sorry for my confusion.

@dmathieu
Copy link
Member

My comment was about assertion of errors in tests.
You're also changing the errors content, and changing the way the response body is closed now.

@jaedle
Copy link
Contributor Author

jaedle commented Jun 27, 2024

My comment was about assertion of errors in tests. You're also changing the errors content, and changing the way the response body is closed now.

Rolled back in a moment, thanks.

@jaedle jaedle force-pushed the bug-5717-obtain-xray-sampling-rules-silent-fail branch from 652be7c to 82112a5 Compare June 27, 2024 09:10
@jaedle
Copy link
Contributor Author

jaedle commented Jun 27, 2024

Sorry for the change, the old way of dealing with response bodies was restored.

@jaedle
Copy link
Contributor Author

jaedle commented Aug 18, 2024

Hey 👋

Any chance to get this merged and released realistically in foreseeable future?

@dmathieu
Copy link
Member

This needs a second review from a @open-telemetry/go-approvers

@jaedle
Copy link
Contributor Author

jaedle commented Sep 24, 2024

Anything I can do from my side to speed things up? It's already 3 month in review.

@dashpole dashpole requested a review from a team as a code owner September 24, 2024 13:39
CHANGELOG.md Outdated Show resolved Hide resolved
@dashpole
Copy link
Contributor

Sorry. We don't have any codeowners for the component, so reviews and such are likely to be much slower.

@jaedle
Copy link
Contributor Author

jaedle commented Sep 25, 2024

Sorry. We don't have any codeowners for the component, so reviews and such are likely to be much slower.

Thanks for the quick response.

@dmathieu dmathieu merged commit a5ea602 into open-telemetry:main Sep 25, 2024
25 checks passed
@MrAlias MrAlias added this to the v1.31.0 milestone Oct 10, 2024
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.

4 participants