File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1111
1212import javax .servlet .Filter ;
1313import java .net .URL ;
14-
14+ import java . lang . Exception ;
1515
1616import org .slf4j .Logger ;
1717import org .slf4j .LoggerFactory ;
@@ -31,16 +31,19 @@ public Filter SimpleCORSFilter() {
3131 }
3232
3333 static {
34- AWSXRay .beginSegment ("Scorekeep" );
3534 AWSXRayRecorderBuilder builder = AWSXRayRecorderBuilder .standard ().withPlugin (new EC2Plugin ()).withPlugin (new ElasticBeanstalkPlugin ());
3635
3736 URL ruleFile = WebConfig .class .getResource ("/sampling-rules.json" );
3837 builder .withSamplingStrategy (new LocalizedSamplingStrategy (ruleFile ));
3938
4039 AWSXRay .setGlobalRecorder (builder .build ());
4140
41+ AWSXRay .beginSegment ("Scorekeep" );
4242 if ( System .getenv ("NOTIFICATION_EMAIL" ) != null ){
43- Utils .createSubscription ();
43+ try { Utils .createSubscription (); }
44+ catch (Exception e ) {
45+ logger .warn ("Failed to create subscription for email " + System .getenv ("NOTIFICATION_EMAIL" ));
46+ }
4447 }
4548
4649 AWSXRay .endSegment ();
You can’t perform that action at this time.
0 commit comments