File tree Expand file tree Collapse file tree 3 files changed +14
-17
lines changed
Expand file tree Collapse file tree 3 files changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ dependencies {
4040dependencyManagement {
4141 imports {
4242 mavenBom(" com.amazonaws:aws-java-sdk-bom:1.11.67" )
43- mavenBom(" com.amazonaws:aws-xray-recorder-sdk-bom:1.0.4 -beta" )
43+ mavenBom(" com.amazonaws:aws-xray-recorder-sdk-bom:1.0.5 -beta" )
4444 }
4545}
4646task wrapper (type : Wrapper ) {
Original file line number Diff line number Diff line change 55import com .amazonaws .xray .javax .servlet .AWSXRayServletFilter ;
66import com .amazonaws .xray .plugins .EC2Plugin ;
77import com .amazonaws .xray .plugins .ElasticBeanstalkPlugin ;
8- import com .amazonaws .xray .strategy .sampling .DefaultSamplingStrategy ;
8+ import com .amazonaws .xray .strategy .sampling .LocalizedSamplingStrategy ;
99import org .springframework .context .annotation .Bean ;
1010import org .springframework .context .annotation .Configuration ;
1111
@@ -30,7 +30,7 @@ public Filter SimpleCORSFilter() {
3030 AWSXRayRecorderBuilder builder = AWSXRayRecorderBuilder .standard ().withPlugin (new EC2Plugin ()).withPlugin (new ElasticBeanstalkPlugin ());
3131
3232 URL ruleFile = WebConfig .class .getResource ("/sampling-rules.json" );
33- builder .withSamplingStrategy (new DefaultSamplingStrategy (ruleFile ));
33+ builder .withSamplingStrategy (new LocalizedSamplingStrategy (ruleFile ));
3434
3535 AWSXRay .setGlobalRecorder (builder .build ());
3636 }
Original file line number Diff line number Diff line change 11{
2- "rules" : {
3- "user" : {
4- "id" : 1 ,
2+ "version" : 1 ,
3+ "rules" : [
4+ {
5+ "description" : " User creation." ,
56 "service_name" : " *" ,
67 "http_method" : " POST" ,
78 "url_path" : " /api/user" ,
89 "fixed_target" : 10 ,
910 "rate" : 1.0
1011 },
11- "move" : {
12- "id " : 2 ,
12+ {
13+ "description " : " Player moves. " ,
1314 "service_name" : " *" ,
1415 "http_method" : " *" ,
1516 "url_path" : " /api/move/*" ,
1617 "fixed_target" : 1 ,
1718 "rate" : 0.05
18- },
19- "base" : {
20- "id" : 3 ,
21- "service_name" : " *" ,
22- "http_method" : " *" ,
23- "url_path" : " *" ,
24- "fixed_target" : 10 ,
25- "rate" : 0.25
2619 }
20+ ],
21+ "default" : {
22+ "fixed_target" : 1 ,
23+ "rate" : 0.1
2724 }
28- }
25+ }
You can’t perform that action at this time.
0 commit comments