Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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 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
# for free to join this conversation on GitHub. Already have an account? # 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