You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an AWSXRayRecorder is built without plugins and without explicitly setting the origin, CentralizedSamplingStrategy#shouldTrace will be called with a sampling request that doesn't have a service type. It has the following fallback:
Not only does the fallback construct a new recorder at each invocation, but it also ends up being wasted work because the result of defaultRecorder() won't have any plugins either.
I'd be happy to submit a fix, but don't know what would be your preferred approach:
Just remove the fallback since it isn't working anyway?
Make CentralizedSamplingStrategy or AWSXRayRecorderBuilder have a list of default plugins that will be queried for origin when the recorder doesn't have an origin? (Though it looks like only EC2Plugin could be on the list since ECSPlugin always "matches" and ElasticBeanstalkPlugin is too noisy when it doesn't.)
Something else?
The text was updated successfully, but these errors were encountered:
When an
AWSXRayRecorder
is built without plugins and without explicitly setting the origin,CentralizedSamplingStrategy#shouldTrace
will be called with a sampling request that doesn't have a service type. It has the following fallback:aws-xray-sdk-java/aws-xray-recorder-sdk-core/src/main/java/com/amazonaws/xray/strategy/sampling/CentralizedSamplingStrategy.java
Lines 63 to 65 in 9fb8e15
Not only does the fallback construct a new recorder at each invocation, but it also ends up being wasted work because the result of
defaultRecorder()
won't have any plugins either.I'd be happy to submit a fix, but don't know what would be your preferred approach:
CentralizedSamplingStrategy
orAWSXRayRecorderBuilder
have a list of default plugins that will be queried for origin when the recorder doesn't have an origin? (Though it looks like onlyEC2Plugin
could be on the list sinceECSPlugin
always "matches" andElasticBeanstalkPlugin
is too noisy when it doesn't.)The text was updated successfully, but these errors were encountered: