@@ -60,7 +60,8 @@ final class SamplingRuleApplier {
60
60
61
61
private static final Map <String , String > XRAY_CLOUD_PLATFORM ;
62
62
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
64
65
private static final String _OTHER_REQUEST_METHOD = "_OTHER" ;
65
66
66
67
static {
@@ -194,14 +195,18 @@ boolean matches(Attributes attributes, Resource resource) {
194
195
} else if (entry .getKey ().equals (HTTP_METHOD )
195
196
|| entry .getKey ().equals (HttpAttributes .HTTP_REQUEST_METHOD )) {
196
197
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
199
202
if (httpMethod .equals (_OTHER_REQUEST_METHOD )) {
200
203
httpMethod = attributes .get (HttpAttributes .HTTP_REQUEST_METHOD_ORIGINAL );
201
204
}
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 )) {
203
207
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 )) {
205
210
// TODO (trask) remove support for deprecated http.host attribute
206
211
host = (String ) entry .getValue ();
207
212
}
0 commit comments