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

[Sampler.AWS] Tested and Updated X-Ray Sampler #1887

Merged
merged 12 commits into from
Jun 17, 2024

Conversation

AsakerMohd
Copy link
Contributor

@AsakerMohd AsakerMohd commented Jun 13, 2024

Changes

Updated the Http attributes that were used and replaced them with URL attributes. This is required since some http attributes are no longer used by instrumentation libraries. More info can be found here: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/src/Shared/SemanticConventions.cs#L99-L108

Also applied some small bug fixes to get the sampler to work.

Testing

We have our own test bed for the X-Ray sampler that we use to test the sampling functionality regardless of the language. https://github.com/aws-observability/aws-otel-community/tree/master/centralized-sampling-tests. I followed those testing instructions there and manually instrumented a sample application and the tests are passing which verifies the functionality of the sampler.

~@88665a24d661 centralized-sampling-tests % ./gradlew :integration-tests:run --scan

> Task :integration-tests:run
23:27:31.011 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting all sample rules
23:27:31.348 [main] DEBUG com.jayway.jsonpath.internal.path.CompiledPath - Evaluating path: $..['RuleName']
23:27:31.352 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting Default sample rule
23:27:31.382 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating SampleNone sample rule
23:27:36.654 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case default
23:27:36.654 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case default
23:27:36.668 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case adminGetSampled
23:27:36.668 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case adminGetSampled
23:27:36.679 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case adminPostSampled
23:27:36.679 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case adminPostSampled
23:27:36.690 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case importantAdmin
23:27:36.690 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case importantAdmin
23:27:36.700 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case importantTest
23:27:36.700 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case importantTest
23:27:36.710 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case serviceImportant
23:27:36.710 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case serviceImportant
23:27:36.720 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case serviceGetSampled
23:27:36.721 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case serviceGetSampled
23:27:36.730 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case servicePostSampled
23:27:36.730 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case servicePostSampled
23:27:36.739 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case multAttributeGetSampled
23:27:36.739 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case multAttributeGetSampled
23:27:36.749 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case multAttributePostSampled
23:27:36.749 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case multAttributePostSampled
23:27:36.758 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case multAttributeImportant
23:27:36.758 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case multAttributeImportant
23:27:36.767 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case PostOnly
23:27:36.767 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case PostOnly
23:27:36.777 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case ImportantServiceName
23:27:36.777 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case ImportantServiceName
23:27:36.787 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNone and test case ImportantServiceName
23:27:36.787 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNone and test case ImportantServiceName
23:27:36.787 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting SampleNone sample rule
23:27:36.852 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating AcceptAll sample rule
23:27:41.927 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case default
23:27:41.927 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case default
23:27:41.973 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case adminGetSampled
23:27:41.973 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case adminGetSampled
23:27:42.020 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case adminPostSampled
23:27:42.021 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case adminPostSampled
23:27:42.067 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case importantAdmin
23:27:42.067 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case importantAdmin
23:27:42.100 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case importantTest
23:27:42.100 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case importantTest
23:27:42.128 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case serviceImportant
23:27:42.128 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case serviceImportant
23:27:42.250 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case serviceGetSampled
23:27:42.250 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case serviceGetSampled
23:27:42.309 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case servicePostSampled
23:27:42.309 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case servicePostSampled
23:27:42.341 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case multAttributeGetSampled
23:27:42.341 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case multAttributeGetSampled
23:27:42.360 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case multAttributePostSampled
23:27:42.360 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case multAttributePostSampled
23:27:42.380 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case multAttributeImportant
23:27:42.380 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case multAttributeImportant
23:27:42.401 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case PostOnly
23:27:42.401 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case PostOnly
23:27:42.420 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case ImportantServiceName
23:27:42.420 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case ImportantServiceName
23:27:42.436 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule AcceptAll and test case ImportantServiceName
23:27:42.437 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AcceptAll and test case ImportantServiceName
23:27:42.437 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting AcceptAll sample rule
23:27:42.489 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating ImportantEndpoint sample rule
23:27:47.535 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 45. Expected rate: 51 for Sample Rule ImportantEndpoint and test case default
23:27:47.535 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case default
23:27:47.542 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 49. Expected rate: 51 for Sample Rule ImportantEndpoint and test case adminGetSampled
23:27:47.542 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case adminGetSampled
23:27:47.550 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 47. Expected rate: 51 for Sample Rule ImportantEndpoint and test case adminPostSampled
23:27:47.550 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case adminPostSampled
23:27:47.576 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantEndpoint and test case importantAdmin
23:27:47.576 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case importantAdmin
23:27:47.604 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantEndpoint and test case importantTest
23:27:47.604 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case importantTest
23:27:47.619 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantEndpoint and test case serviceImportant
23:27:47.619 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case serviceImportant
23:27:47.628 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 51. Expected rate: 51 for Sample Rule ImportantEndpoint and test case serviceGetSampled
23:27:47.628 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case serviceGetSampled
23:27:47.637 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 48. Expected rate: 51 for Sample Rule ImportantEndpoint and test case servicePostSampled
23:27:47.637 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case servicePostSampled
23:27:47.644 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 42. Expected rate: 51 for Sample Rule ImportantEndpoint and test case multAttributeGetSampled
23:27:47.644 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case multAttributeGetSampled
23:27:47.651 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 55. Expected rate: 51 for Sample Rule ImportantEndpoint and test case multAttributePostSampled
23:27:47.651 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case multAttributePostSampled
23:27:47.658 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantEndpoint and test case multAttributeImportant
23:27:47.658 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case multAttributeImportant
23:27:47.665 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 54. Expected rate: 51 for Sample Rule ImportantEndpoint and test case PostOnly
23:27:47.665 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case PostOnly
23:27:47.672 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 42. Expected rate: 51 for Sample Rule ImportantEndpoint and test case ImportantServiceName
23:27:47.672 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case ImportantServiceName
23:27:47.678 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 45. Expected rate: 51 for Sample Rule ImportantEndpoint and test case ImportantServiceName
23:27:47.678 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case ImportantServiceName
23:27:47.678 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting ImportantEndpoint sample rule
23:27:47.743 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating ImportantAttribute sample rule
23:27:52.783 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 51 for Sample Rule ImportantAttribute and test case default
23:27:52.783 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case default
23:27:52.798 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 517. Expected rate: 500 for Sample Rule ImportantAttribute and test case adminGetSampled
23:27:52.798 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case adminGetSampled
23:27:52.816 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 462. Expected rate: 500 for Sample Rule ImportantAttribute and test case adminPostSampled
23:27:52.816 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case adminPostSampled
23:27:52.834 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 509. Expected rate: 500 for Sample Rule ImportantAttribute and test case importantAdmin
23:27:52.834 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case importantAdmin
23:27:52.841 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 51 for Sample Rule ImportantAttribute and test case importantTest
23:27:52.841 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case importantTest
23:27:52.848 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 46. Expected rate: 51 for Sample Rule ImportantAttribute and test case serviceImportant
23:27:52.848 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case serviceImportant
23:27:52.856 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 56. Expected rate: 51 for Sample Rule ImportantAttribute and test case serviceGetSampled
23:27:52.856 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case serviceGetSampled
23:27:52.862 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 49. Expected rate: 51 for Sample Rule ImportantAttribute and test case servicePostSampled
23:27:52.862 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case servicePostSampled
23:27:52.925 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 492. Expected rate: 500 for Sample Rule ImportantAttribute and test case multAttributeGetSampled
23:27:52.925 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case multAttributeGetSampled
23:27:52.952 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 487. Expected rate: 500 for Sample Rule ImportantAttribute and test case multAttributePostSampled
23:27:52.952 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case multAttributePostSampled
23:27:53.020 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 496. Expected rate: 500 for Sample Rule ImportantAttribute and test case multAttributeImportant
23:27:53.021 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case multAttributeImportant
23:27:53.029 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 43. Expected rate: 51 for Sample Rule ImportantAttribute and test case PostOnly
23:27:53.029 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case PostOnly
23:27:53.039 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 64. Expected rate: 51 for Sample Rule ImportantAttribute and test case ImportantServiceName
23:27:53.039 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case ImportantServiceName
23:27:53.058 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 533. Expected rate: 500 for Sample Rule ImportantAttribute and test case ImportantServiceName
23:27:53.059 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case ImportantServiceName
23:27:53.059 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting ImportantAttribute sample rule
23:27:53.107 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating AttributeAtEndpoint sample rule
23:27:58.164 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 50. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case default
23:27:58.164 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case default
23:27:58.180 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 46. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case adminGetSampled
23:27:58.180 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case adminGetSampled
23:27:58.202 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 61. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case adminPostSampled
23:27:58.202 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case adminPostSampled
23:27:58.222 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 51. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case importantAdmin
23:27:58.222 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case importantAdmin
23:27:58.243 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 50. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case importantTest
23:27:58.243 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case importantTest
23:27:58.269 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 54. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case serviceImportant
23:27:58.269 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case serviceImportant
23:27:58.274 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 474. Expected rate: 510 for Sample Rule AttributeAtEndpoint and test case serviceGetSampled
23:27:58.274 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case serviceGetSampled
23:27:58.279 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 493. Expected rate: 510 for Sample Rule AttributeAtEndpoint and test case servicePostSampled
23:27:58.279 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case servicePostSampled
23:27:58.293 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 50. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case multAttributeGetSampled
23:27:58.293 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case multAttributeGetSampled
23:27:58.309 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 41. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case multAttributePostSampled
23:27:58.309 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case multAttributePostSampled
23:27:58.324 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 49. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case multAttributeImportant
23:27:58.324 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case multAttributeImportant
23:27:58.338 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 46. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case PostOnly
23:27:58.338 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case PostOnly
23:27:58.435 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 49. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case ImportantServiceName
23:27:58.435 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case ImportantServiceName
23:27:58.465 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 45. Expected rate: 51 for Sample Rule AttributeAtEndpoint and test case ImportantServiceName
23:27:58.465 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case ImportantServiceName
23:27:58.465 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting AttributeAtEndpoint sample rule
23:27:58.514 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating LowReservoir sample rule
23:28:03.557 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 792. Expected rate: 800 for Sample Rule LowReservoir and test case default
23:28:03.558 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case default
23:28:03.562 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 830. Expected rate: 800 for Sample Rule LowReservoir and test case adminGetSampled
23:28:03.562 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case adminGetSampled
23:28:03.566 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 790. Expected rate: 800 for Sample Rule LowReservoir and test case adminPostSampled
23:28:03.566 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case adminPostSampled
23:28:03.571 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 837. Expected rate: 800 for Sample Rule LowReservoir and test case importantAdmin
23:28:03.571 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case importantAdmin
23:28:03.575 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 799. Expected rate: 800 for Sample Rule LowReservoir and test case importantTest
23:28:03.575 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case importantTest
23:28:03.579 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 796. Expected rate: 800 for Sample Rule LowReservoir and test case serviceImportant
23:28:03.580 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case serviceImportant
23:28:03.584 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 790. Expected rate: 800 for Sample Rule LowReservoir and test case serviceGetSampled
23:28:03.584 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case serviceGetSampled
23:28:03.588 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 796. Expected rate: 800 for Sample Rule LowReservoir and test case servicePostSampled
23:28:03.588 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case servicePostSampled
23:28:03.592 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 817. Expected rate: 800 for Sample Rule LowReservoir and test case multAttributeGetSampled
23:28:03.592 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case multAttributeGetSampled
23:28:03.595 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 794. Expected rate: 800 for Sample Rule LowReservoir and test case multAttributePostSampled
23:28:03.595 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case multAttributePostSampled
23:28:03.599 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 796. Expected rate: 800 for Sample Rule LowReservoir and test case multAttributeImportant
23:28:03.599 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case multAttributeImportant
23:28:03.603 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 778. Expected rate: 800 for Sample Rule LowReservoir and test case PostOnly
23:28:03.603 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case PostOnly
23:28:03.607 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 815. Expected rate: 800 for Sample Rule LowReservoir and test case ImportantServiceName
23:28:03.607 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case ImportantServiceName
23:28:03.610 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 798. Expected rate: 800 for Sample Rule LowReservoir and test case ImportantServiceName
23:28:03.611 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: LowReservoir and test case ImportantServiceName
23:28:03.611 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting LowReservoir sample rule
23:28:03.656 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating PostRule sample rule
23:28:08.699 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 51 for Sample Rule PostRule and test case default
23:28:08.699 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case default
23:28:08.716 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 51 for Sample Rule PostRule and test case adminGetSampled
23:28:08.716 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case adminGetSampled
23:28:08.722 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 99. Expected rate: 110 for Sample Rule PostRule and test case adminPostSampled
23:28:08.722 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case adminPostSampled
23:28:08.743 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 47. Expected rate: 51 for Sample Rule PostRule and test case importantAdmin
23:28:08.743 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case importantAdmin
23:28:08.764 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 43. Expected rate: 51 for Sample Rule PostRule and test case importantTest
23:28:08.764 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case importantTest
23:28:08.780 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 53. Expected rate: 51 for Sample Rule PostRule and test case serviceImportant
23:28:08.780 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case serviceImportant
23:28:08.799 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 43. Expected rate: 51 for Sample Rule PostRule and test case serviceGetSampled
23:28:08.799 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case serviceGetSampled
23:28:08.805 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 115. Expected rate: 110 for Sample Rule PostRule and test case servicePostSampled
23:28:08.805 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case servicePostSampled
23:28:08.827 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 56. Expected rate: 51 for Sample Rule PostRule and test case multAttributeGetSampled
23:28:08.827 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case multAttributeGetSampled
23:28:08.834 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 94. Expected rate: 110 for Sample Rule PostRule and test case multAttributePostSampled
23:28:08.834 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case multAttributePostSampled
23:28:08.855 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 41. Expected rate: 51 for Sample Rule PostRule and test case multAttributeImportant
23:28:08.855 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case multAttributeImportant
23:28:08.862 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 99. Expected rate: 110 for Sample Rule PostRule and test case PostOnly
23:28:08.863 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case PostOnly
23:28:08.880 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 51 for Sample Rule PostRule and test case ImportantServiceName
23:28:08.880 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case ImportantServiceName
23:28:08.901 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 49. Expected rate: 51 for Sample Rule PostRule and test case ImportantServiceName
23:28:08.901 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case ImportantServiceName
23:28:08.901 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting PostRule sample rule
23:28:08.963 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating MultipleAttributes sample rule
23:28:14.009 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 57. Expected rate: 51 for Sample Rule MultipleAttributes and test case default
23:28:14.009 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case default
23:28:14.022 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 45. Expected rate: 51 for Sample Rule MultipleAttributes and test case adminGetSampled
23:28:14.022 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case adminGetSampled
23:28:14.039 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 48. Expected rate: 51 for Sample Rule MultipleAttributes and test case adminPostSampled
23:28:14.039 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case adminPostSampled
23:28:14.056 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 48. Expected rate: 51 for Sample Rule MultipleAttributes and test case importantAdmin
23:28:14.056 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case importantAdmin
23:28:14.071 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 62. Expected rate: 51 for Sample Rule MultipleAttributes and test case importantTest
23:28:14.071 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case importantTest
23:28:14.086 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 43. Expected rate: 51 for Sample Rule MultipleAttributes and test case serviceImportant
23:28:14.086 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case serviceImportant
23:28:14.103 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 54. Expected rate: 51 for Sample Rule MultipleAttributes and test case serviceGetSampled
23:28:14.103 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case serviceGetSampled
23:28:14.189 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 44. Expected rate: 51 for Sample Rule MultipleAttributes and test case servicePostSampled
23:28:14.189 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case servicePostSampled
23:28:14.244 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 419. Expected rate: 410 for Sample Rule MultipleAttributes and test case multAttributeGetSampled
23:28:14.244 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case multAttributeGetSampled
23:28:14.264 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 393. Expected rate: 410 for Sample Rule MultipleAttributes and test case multAttributePostSampled
23:28:14.264 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case multAttributePostSampled
23:28:14.281 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 387. Expected rate: 410 for Sample Rule MultipleAttributes and test case multAttributeImportant
23:28:14.281 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case multAttributeImportant
23:28:14.297 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 36. Expected rate: 51 for Sample Rule MultipleAttributes and test case PostOnly
23:28:14.297 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case PostOnly
23:28:14.313 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 48. Expected rate: 51 for Sample Rule MultipleAttributes and test case ImportantServiceName
23:28:14.314 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case ImportantServiceName
23:28:14.330 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 43. Expected rate: 51 for Sample Rule MultipleAttributes and test case ImportantServiceName
23:28:14.330 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: MultipleAttributes and test case ImportantServiceName
23:28:14.330 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting MultipleAttributes sample rule
23:28:19.409 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 70. Expected rate: 60 for Sample Rule Default and test case default
23:28:19.409 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case default
23:28:19.426 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 60 for Sample Rule Default and test case adminGetSampled
23:28:19.426 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case adminGetSampled
23:28:19.449 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 53. Expected rate: 60 for Sample Rule Default and test case adminPostSampled
23:28:19.449 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case adminPostSampled
23:28:19.464 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 51. Expected rate: 60 for Sample Rule Default and test case importantAdmin
23:28:19.464 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case importantAdmin
23:28:19.478 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 34. Expected rate: 60 for Sample Rule Default and test case importantTest
23:28:19.478 [main] WARN com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate does not match expected rate
23:28:19.478 [main] WARN com.amazon.tests.CentralizedSamplingIntegrationTests - Test failed here, attempting retry
23:28:24.499 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 60 for Sample Rule Default and test case importantTest
23:28:24.499 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case importantTest
23:28:24.520 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 49. Expected rate: 60 for Sample Rule Default and test case serviceImportant
23:28:24.520 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case serviceImportant
23:28:24.538 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 50. Expected rate: 60 for Sample Rule Default and test case serviceGetSampled
23:28:24.539 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case serviceGetSampled
23:28:24.557 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 42. Expected rate: 60 for Sample Rule Default and test case servicePostSampled
23:28:24.557 [main] WARN com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate does not match expected rate
23:28:24.557 [main] WARN com.amazon.tests.CentralizedSamplingIntegrationTests - Test failed here, attempting retry
23:28:29.581 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 48. Expected rate: 60 for Sample Rule Default and test case servicePostSampled
23:28:29.581 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case servicePostSampled
23:28:29.595 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 50. Expected rate: 60 for Sample Rule Default and test case multAttributeGetSampled
23:28:29.595 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case multAttributeGetSampled
23:28:29.610 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 45. Expected rate: 60 for Sample Rule Default and test case multAttributePostSampled
23:28:29.610 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case multAttributePostSampled
23:28:29.627 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 44. Expected rate: 60 for Sample Rule Default and test case multAttributeImportant
23:28:29.627 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case multAttributeImportant
23:28:29.643 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 44. Expected rate: 60 for Sample Rule Default and test case PostOnly
23:28:29.643 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case PostOnly
23:28:29.734 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 60. Expected rate: 60 for Sample Rule Default and test case ImportantServiceName
23:28:29.734 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case ImportantServiceName
23:28:29.781 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 60 for Sample Rule Default and test case ImportantServiceName
23:28:29.781 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: Default and test case ImportantServiceName
23:28:29.781 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting Default sample rule
23:28:29.816 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating ImportantServiceName sample rule
23:28:34.871 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case default
23:28:34.871 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case default
23:28:34.888 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case adminGetSampled
23:28:34.888 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case adminGetSampled
23:28:34.904 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case adminPostSampled
23:28:34.904 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case adminPostSampled
23:28:34.920 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case importantAdmin
23:28:34.920 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case importantAdmin
23:28:34.938 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case importantTest
23:28:34.938 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case importantTest
23:28:34.955 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case serviceImportant
23:28:34.955 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case serviceImportant
23:28:34.971 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case serviceGetSampled
23:28:34.971 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case serviceGetSampled
23:28:34.993 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case servicePostSampled
23:28:34.993 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case servicePostSampled
23:28:35.009 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case multAttributeGetSampled
23:28:35.009 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case multAttributeGetSampled
23:28:35.023 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case multAttributePostSampled
23:28:35.023 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case multAttributePostSampled
23:28:35.043 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case multAttributeImportant
23:28:35.043 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case multAttributeImportant
23:28:35.097 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case PostOnly
23:28:35.097 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case PostOnly
23:28:35.153 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case ImportantServiceName
23:28:35.153 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case ImportantServiceName
23:28:35.192 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantServiceName and test case ImportantServiceName
23:28:35.192 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantServiceName and test case ImportantServiceName
23:28:35.192 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting ImportantServiceName sample rule
23:28:35.251 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating SampleNoneAtEndpoint sample rule
23:28:40.307 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 45. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case default
23:28:40.307 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case default
23:28:40.323 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 62. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case adminGetSampled
23:28:40.323 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case adminGetSampled
23:28:40.339 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 45. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case adminPostSampled
23:28:40.339 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case adminPostSampled
23:28:40.345 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNoneAtEndpoint and test case importantAdmin
23:28:40.345 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case importantAdmin
23:28:40.350 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNoneAtEndpoint and test case importantTest
23:28:40.350 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case importantTest
23:28:40.356 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNoneAtEndpoint and test case serviceImportant
23:28:40.356 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case serviceImportant
23:28:40.371 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 37. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case serviceGetSampled
23:28:40.371 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case serviceGetSampled
23:28:40.387 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 57. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case servicePostSampled
23:28:40.387 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case servicePostSampled
23:28:40.408 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 53. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case multAttributeGetSampled
23:28:40.409 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case multAttributeGetSampled
23:28:40.424 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 50. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case multAttributePostSampled
23:28:40.424 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case multAttributePostSampled
23:28:40.429 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 0. Expected rate: 0 for Sample Rule SampleNoneAtEndpoint and test case multAttributeImportant
23:28:40.429 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case multAttributeImportant
23:28:40.443 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 41. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case PostOnly
23:28:40.443 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case PostOnly
23:28:40.560 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 52. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case ImportantServiceName
23:28:40.560 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case ImportantServiceName
23:28:40.613 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 59. Expected rate: 51 for Sample Rule SampleNoneAtEndpoint and test case ImportantServiceName
23:28:40.613 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: SampleNoneAtEndpoint and test case ImportantServiceName
23:28:40.614 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting SampleNoneAtEndpoint sample rule
23:28:40.697 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating HighReservoir sample rule
23:28:40.746 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 44. Expected rate: 500 for Sample Rule HighReservoir and test case default
23:28:40.746 [main] WARN com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate does not match expected rate
23:28:40.746 [main] WARN com.amazon.tests.CentralizedSamplingIntegrationTests - Test failed, attempting retry
23:29:00.765 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 506. Expected rate: 500 for Sample Rule HighReservoir and test case default
23:29:00.765 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting HighReservoir sample rule
23:29:00.841 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating MixedReservoir sample rule
23:29:00.894 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 64. Expected rate: 750 for Sample Rule MixedReservoir and test case default
23:29:00.894 [main] WARN com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate does not match expected rate
23:29:00.894 [main] WARN com.amazon.tests.CentralizedSamplingIntegrationTests - Test failed, attempting retry
23:29:20.917 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 779. Expected rate: 750 for Sample Rule MixedReservoir and test case default
23:29:20.917 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting MixedReservoir sample rule
23:29:20.975 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating ImportantEndpoint sample rule
23:29:21.013 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating ImportantAttribute sample rule
23:29:21.050 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating AttributeAtEndpoint sample rule
23:29:21.087 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Creating PostRule sample rule
23:29:26.148 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 50. Expected rate: 51 for Sample Rule PostRule and test case default
23:29:26.148 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case default
23:29:26.164 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 489. Expected rate: 500 for Sample Rule ImportantAttribute and test case adminGetSampled
23:29:26.164 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case adminGetSampled
23:29:26.181 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 519. Expected rate: 500 for Sample Rule ImportantAttribute and test case adminPostSampled
23:29:26.181 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case adminPostSampled
23:29:26.196 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantEndpoint and test case importantAdmin
23:29:26.197 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case importantAdmin
23:29:26.213 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantEndpoint and test case importantTest
23:29:26.213 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case importantTest
23:29:26.227 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantEndpoint and test case serviceImportant
23:29:26.227 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case serviceImportant
23:29:26.246 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 513. Expected rate: 510 for Sample Rule AttributeAtEndpoint and test case serviceGetSampled
23:29:26.246 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case serviceGetSampled
23:29:26.345 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 486. Expected rate: 510 for Sample Rule AttributeAtEndpoint and test case servicePostSampled
23:29:26.345 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: AttributeAtEndpoint and test case servicePostSampled
23:29:26.396 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 493. Expected rate: 500 for Sample Rule ImportantAttribute and test case multAttributeGetSampled
23:29:26.396 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case multAttributeGetSampled
23:29:26.416 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 506. Expected rate: 500 for Sample Rule ImportantAttribute and test case multAttributePostSampled
23:29:26.416 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case multAttributePostSampled
23:29:26.446 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 1000. Expected rate: 1000 for Sample Rule ImportantEndpoint and test case multAttributeImportant
23:29:26.446 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantEndpoint and test case multAttributeImportant
23:29:26.475 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 96. Expected rate: 110 for Sample Rule PostRule and test case PostOnly
23:29:26.476 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case PostOnly
23:29:26.499 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 49. Expected rate: 51 for Sample Rule PostRule and test case ImportantServiceName
23:29:26.499 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: PostRule and test case ImportantServiceName
23:29:26.540 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Sampled rate: 473. Expected rate: 500 for Sample Rule ImportantAttribute and test case ImportantServiceName
23:29:26.540 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Test passed for Sample rule: ImportantAttribute and test case ImportantServiceName
23:29:26.540 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting ImportantEndpoint sample rule
23:29:26.591 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting ImportantAttribute sample rule
23:29:26.648 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting AttributeAtEndpoint sample rule
23:29:26.714 [main] INFO com.amazon.tests.CentralizedSamplingIntegrationTests - Deleting PostRule sample rule

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1m 57s
2 actionable tasks: 1 executed, 1 up-to-date

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@AsakerMohd AsakerMohd requested a review from a team June 13, 2024 17:38
Copy link

linux-foundation-easycla bot commented Jun 13, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

src/OpenTelemetry.Sampler.AWS/RulesCache.cs Show resolved Hide resolved
{
httpUrl = (string?)tag.Value;
}
else if (tag.Key.Equals(SemanticConventions.AttributeHttpMethod, StringComparison.Ordinal))
else if (tag.Key.Equals(SemanticConventions.AttributeHttpRequestMethod, StringComparison.Ordinal))
Copy link
Member

Choose a reason for hiding this comment

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

Are there any unit tests in OpenTelemetry.Sampler.AWS.Tests that need to be updated as part of this change?

I'm not hyper familiar with this code base, but this looks like a potential candidate: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/blob/main/test/OpenTelemetry.Sampler.AWS.Tests/TestSamplingRuleApplier.cs#L33

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good callout. Let me run the unit tests to make sure they are passing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the unit tests and they are passing now.

asakem@88665a24d661 OpenTelemetry.Sampler.AWS.Tests % dotnet test
  Determining projects to restore...
  All projects are up-to-date for restore.
  OpenTelemetry.Sampler.AWS -> /Volumes/workplace/otel-dotnet-contrib/opentelemetry-dotnet-contrib/src/OpenTelemetry.Sampler.AWS/bin/Debug/net6.0/OpenTelemetry.Sampler.AWS.dll
  OpenTelemetry.Sampler.AWS.Tests -> /Volumes/workplace/otel-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Sampler.AWS.Tests/bin/Debug/net8.0/OpenTelemetry.Sampler.AWS.Tests.dll
  OpenTelemetry.Sampler.AWS.Tests -> /Volumes/workplace/otel-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Sampler.AWS.Tests/bin/Debug/net6.0/OpenTelemetry.Sampler.AWS.Tests.dll
  OpenTelemetry.Sampler.AWS.Tests -> /Volumes/workplace/otel-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Sampler.AWS.Tests/bin/Debug/net7.0/OpenTelemetry.Sampler.AWS.Tests.dll
Test run for /Volumes/workplace/otel-dotnet-contrib/opentelemetry-dotnet-contrib/test/OpenTelemetry.Sampler.AWS.Tests/bin/Debug/net8.0/OpenTelemetry.Sampler.AWS.Tests.dll (.NETCoreApp,Version=v8.0)
Microsoft (R) Test Execution Command Line Tool Version 17.9.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.29]     OpenTelemetry.Sampler.AWS.Tests.TestAWSXRayRemoteSampler.TestSamplerUpdateAndSample [SKIP]
  Skipped OpenTelemetry.Sampler.AWS.Tests.TestAWSXRayRemoteSampler.TestSamplerUpdateAndSample [1 ms]

Passed!  - Failed:     0, Passed:    46, Skipped:     1, Total:    47, Duration: 313 ms - OpenTelemetry.Sampler.AWS.Tests.dll (net8.0)

Copy link
Contributor

@srprash srprash left a comment

Choose a reason for hiding this comment

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

LGTM. just a small comment.


var ruleApplier = new SamplingRuleApplier(this.ClientId, this.Clock, rule, currentStatistics);
Copy link
Contributor

Choose a reason for hiding this comment

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

I recall this was done to "sort of" implement immutability of the ruleApplier instances (which is generally a good idea). But as we discussed offline this leads to some race conditions. Can you briefly explain either as a comment in the code or in this PR on why we need to break the immutability and mutate the instance now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change was made mainly to address one race condition. Basically, with the previous implementation, whenever the RulesCache is periodically updated, it would pull in the list of rules available and if the rule already existed, the Statistics were carried over into a new instance of the rule applier. This caused a race condition. Say the rule had a reservoir of 500 requests/sec and FixedRateSampler with 1/sec after the reservoir is depleted. When creating a new instance of the rule, the constructor creates a new RateLimittingSampler with a reservoir of 1/s and fixedRateSampler with with 1/sec as well since that's in the rule definitio until UpdateTargets is called to set the reservoir according to how the rule is set in cloudwatch (500/s). Between creating a new instance and calling UpdateTargets, if we get a bunch of 200 requests/sec that match the rule, only 2 will be sampled, 1 due to reservoir sampler and the other due to falling back to the fixed rate sampler. If the sampler poling is set to refresh each second, then this will be a problem since it can be the case that the reservoir will mostly only be 1 and not the intended 500. With this change, it will retain the RateLimitingSampler with the correct reservoir while only the rule and it's definition will get updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense and lgtm.
Another thing we could have done to preserve immutability was to also pass in the current reservoir size here and create a new RateLimitingSampler with this reservoir size for a new SamplingRuleApplier instance. Just a suggestion, not required right away.

@github-actions github-actions bot added the comp:sampler.aws Things related to OpenTelemetry.Samplers.AWS label Jun 14, 2024
@Kielek Kielek changed the title Tested and Updated X-Ray Sampler [Sampler.AWS] Tested and Updated X-Ray Sampler Jun 14, 2024
Copy link
Contributor

@Kielek Kielek left a comment

Choose a reason for hiding this comment

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

Changes looks good.

I have a question about test suite. Is there any possibility to include it in pipeline? Maybe executing it in dockerized env? It will be great to ensure that we do not introduce any breaking changes during maintenance.

Package was never released, probably do not need to extend CHANGELOG..

@AsakerMohd AsakerMohd closed this Jun 14, 2024
@AsakerMohd AsakerMohd reopened this Jun 14, 2024
@AsakerMohd
Copy link
Contributor Author

Changes looks good.

I have a question about test suite. Is there any possibility to include it in pipeline? Maybe executing it in dockerized env? It will be great to ensure that we do not introduce any breaking changes during maintenance.

Package was never released, probably do not need to extend CHANGELOG..

We can look into that.

Also, I'm trying to merge but the build-test workflow seems like it's bugged and doesn't want to start. Any ideas?

@AsakerMohd AsakerMohd requested a review from Kielek June 14, 2024 21:02
@Kielek
Copy link
Contributor

Kielek commented Jun 14, 2024

It is your first contribution to this repo. It means ci needs approval to be executed.

@AsakerMohd
Copy link
Contributor Author

AsakerMohd commented Jun 14, 2024

It is your first contribution to this repo. It means ci needs approval to be executed.

I see. Looks like the build is passing now but it’s still pending your approval although i already have the one approval from you😅

@Kielek Kielek merged commit 7e93019 into open-telemetry:main Jun 17, 2024
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:sampler.aws Things related to OpenTelemetry.Samplers.AWS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants