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

Fix: Silently failing of sampling rules #5795

Closed

Conversation

ayushrakesh
Copy link

Added status code in checking the getSamplingRules function. Added unit test for it.

Fixes #5717

Description

getSamplingRules method in the AWS X-Ray sampler did not check the HTTP response status code, potentially leading to incorrect handling of non-200 responses.

  • Added a check for the HTTP response status code in the getSamplingRules method.
  • If the status code is not 200, the method now returns an error instead of proceeding to unmarshal the response body.
  • Included test for this status code check.

Signed-off-by: ayushrakesh <ayushrakesh.05@gmail.com>
@ayushrakesh ayushrakesh requested a review from a team as a code owner June 23, 2024 11:39
Signed-off-by: ayushrakesh <ayushrakesh.05@gmail.com>
@dmathieu
Copy link
Member

Duplicate of #5718

@dmathieu dmathieu marked this as a duplicate of #5718 Jun 23, 2024
@dmathieu dmathieu closed this Jun 23, 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.

Obtaining sampling rules may silently fail
2 participants