joem86
03/14/2019, 1:23 PM@Bean
FilterRegistrationBean registerXRayFilter() {
new FilterRegistrationBean(
filter: new AWSXRayServletFilter(new DynamicSegmentNamingStrategy("MyApplication", '*.<http://example.com|example.com>')),
order: Ordered.HIGHEST_PRECEDENCE
)
}
That creates the segments. The interceptor would call AWSXray.beginSubsegment('MyInterceptor') and AWSXray.endSubsegment(), and the AWS SDK does some "magic" (I think) to ensure the information is added to the segment created by the servlet filter.