File tree 1 file changed +4
-4
lines changed
aws-xray-recorder-sdk-core/src/main/java/com/amazonaws/xray/jakarta/servlet
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public AWSXRayServletFilter() {
68
68
}
69
69
70
70
public AWSXRayServletFilter (String fixedSegmentName ) {
71
- this (new FixedSegmentNamingStrategy (fixedSegmentName ));
71
+ this (SegmentNamingStrategy . fixed (fixedSegmentName ));
72
72
}
73
73
74
74
public AWSXRayServletFilter (@ Nullable SegmentNamingStrategy segmentNamingStrategy ) {
@@ -158,12 +158,12 @@ public void init(FilterConfig config) throws ServletException {
158
158
String dynamicNamingRecognizedHosts = config .getInitParameter ("dynamicNamingRecognizedHosts" );
159
159
if (StringValidator .isNotNullOrBlank (dynamicNamingFallbackName )) {
160
160
if (StringValidator .isNotNullOrBlank (dynamicNamingRecognizedHosts )) {
161
- segmentNamingStrategy = new DynamicSegmentNamingStrategy (dynamicNamingFallbackName , dynamicNamingRecognizedHosts );
161
+ segmentNamingStrategy = SegmentNamingStrategy . dynamic (dynamicNamingFallbackName , dynamicNamingRecognizedHosts );
162
162
} else {
163
- segmentNamingStrategy = new DynamicSegmentNamingStrategy (dynamicNamingFallbackName );
163
+ segmentNamingStrategy = SegmentNamingStrategy . dynamic (dynamicNamingFallbackName );
164
164
}
165
165
} else if (StringValidator .isNotNullOrBlank (fixedName )) {
166
- segmentNamingStrategy = new FixedSegmentNamingStrategy (fixedName );
166
+ segmentNamingStrategy = SegmentNamingStrategy . fixed (fixedName );
167
167
} else if (null == segmentNamingStrategy ) {
168
168
throw new ServletException (
169
169
"The AWSXRayServletFilter requires either a fixedName init-param or an instance of SegmentNamingStrategy. "
You can’t perform that action at this time.
0 commit comments