opentelemetry-java-contrib icon indicating copy to clipboard operation
opentelemetry-java-contrib copied to clipboard

[aws-xray] Update SamplerRulesApplier to recognize new HTTP/URL semconv.

Open AsakerMohd opened this issue 5 months ago • 0 comments

Description: The HTTP/URL semantic conventions were updated making the X-Ray Sampler outdated since it only recognizes the older HTTP semantic conventions. I've updated the SamplingRuleApplier to look at both the old and new conventions for backwards compatibility.

Testing: Updated unit tests and are now passing.

Manual Testing:

For the manual testing. I created three sampling rules in the X-Ray console

  1. Default one with zero sampling
  2. Second one with path = /aws-sdk-call with 100% sampling
  3. Third one with path = /outgoing-http-call with 100% sampling

I used a sample app with two APIs:

  1. /outgoing-http-call
  2. /aws-sdk-call

Before the change, calling any of the above APIs wasn't being matched when it should. After the change, the rules were being matched and each rule showed the correct stats.

Before the change: Screenshot 2025-06-01 at 11 34 56 PM

After the change: Screenshot 2025-06-01 at 11 29 54 PM

AsakerMohd avatar Jun 12 '25 04:06 AsakerMohd