Skip to content

Commit 846657b

Browse files
committed
./gradlew spotlessApply
1 parent fd8fd81 commit 846657b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/SamplingRuleApplier.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ final class SamplingRuleApplier {
6060

6161
private static final Map<String, String> XRAY_CLOUD_PLATFORM;
6262

63-
// _OTHER request method: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/http.md?plain=1#L96
63+
// _OTHER request method:
64+
// https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/http.md?plain=1#L96
6465
private static final String _OTHER_REQUEST_METHOD = "_OTHER";
6566

6667
static {
@@ -194,14 +195,18 @@ boolean matches(Attributes attributes, Resource resource) {
194195
} else if (entry.getKey().equals(HTTP_METHOD)
195196
|| entry.getKey().equals(HttpAttributes.HTTP_REQUEST_METHOD)) {
196197
httpMethod = (String) entry.getValue();
197-
// according to semantic conventions, if the HTTP request method is not known to instrumentation
198-
// it must be set to _OTHER and the HTTP_REQUEST_METHOD_ORIGINAL should contain the original method
198+
// according to semantic conventions, if the HTTP request method is not known to
199+
// instrumentation
200+
// it must be set to _OTHER and the HTTP_REQUEST_METHOD_ORIGINAL should contain the original
201+
// method
199202
if (httpMethod.equals(_OTHER_REQUEST_METHOD)) {
200203
httpMethod = attributes.get(HttpAttributes.HTTP_REQUEST_METHOD_ORIGINAL);
201204
}
202-
} else if (entry.getKey().equals(NET_HOST_NAME) || (entry.getKey().equals(ServerAttributes.SERVER_ADDRESS))) {
205+
} else if (entry.getKey().equals(NET_HOST_NAME)
206+
|| (entry.getKey().equals(ServerAttributes.SERVER_ADDRESS))) {
203207
host = (String) entry.getValue();
204-
} else if (entry.getKey().equals(HTTP_HOST) || (entry.getKey().equals(ServerAttributes.SERVER_ADDRESS))) {
208+
} else if (entry.getKey().equals(HTTP_HOST)
209+
|| (entry.getKey().equals(ServerAttributes.SERVER_ADDRESS))) {
205210
// TODO (trask) remove support for deprecated http.host attribute
206211
host = (String) entry.getValue();
207212
}

0 commit comments

Comments
 (0)