aws / aws-xray-java-agent

The official AWS X-Ray Auto Instrumentation Agent for Java.
Apache License 2.0
42 stars 18 forks source link

Fixed upstream sampling bug #66

Closed willarmiros closed 3 years ago

willarmiros commented 3 years ago

Issue #, if available:

64

Description of changes: Fixes a bug where the ServletHandler would assume upstream UNKNOWN sampling decisions to be false, and instead we compute a new sampling decision in this case. Added unit tests to verify behavior.

Also sprinkled in some Nullable usage, removed some unnecessary Optional usage, and some other small cleanups.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

willarmiros commented 3 years ago

I just accidentally merged this thinking it was a different PR 🤦

@anuraaga I'd still appreciate a review, and I just enabled protections on the branch to prevent this from happening again