|
@@ -280,7 +280,7 @@ public class PojoSpan {
|
|
URL url = (new URI(rawUrl)).toURL();
|
|
URL url = (new URI(rawUrl)).toURL();
|
|
return url.getPath();
|
|
return url.getPath();
|
|
} catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) {
|
|
} catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) {
|
|
- logger.warn("解析http route失败: ss: {}", (Object) SpanAttributes);
|
|
|
|
|
|
+// logger.warn("解析http route失败: ss: {}", (Object) SpanAttributes);
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -294,7 +294,7 @@ public class PojoSpan {
|
|
if (url.isEmpty()) {
|
|
if (url.isEmpty()) {
|
|
String host = getAttribute("", "http.host").trim();
|
|
String host = getAttribute("", "http.host").trim();
|
|
if (host.isEmpty()) { // 没有host,返回空url
|
|
if (host.isEmpty()) { // 没有host,返回空url
|
|
- logger.warn("解析http url失败: ss: {}", (Object) SpanAttributes);
|
|
|
|
|
|
+// logger.warn("解析http url失败: ss: {}", (Object) SpanAttributes);
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
String target = getAttribute("", "http.target").trim();
|
|
String target = getAttribute("", "http.target").trim();
|
|
@@ -316,7 +316,7 @@ public class PojoSpan {
|
|
}
|
|
}
|
|
String rawUrl = this.getHttpUrl().trim();
|
|
String rawUrl = this.getHttpUrl().trim();
|
|
if (rawUrl.isEmpty()) {
|
|
if (rawUrl.isEmpty()) {
|
|
- logger.warn("解析http target失败: ss: {}", (Object) SpanAttributes);
|
|
|
|
|
|
+// logger.warn("解析http target失败: ss: {}", (Object) SpanAttributes);
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
@@ -328,7 +328,7 @@ public class PojoSpan {
|
|
}
|
|
}
|
|
return String.format("%s?%s", pt, rawQuery);
|
|
return String.format("%s?%s", pt, rawQuery);
|
|
} catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) {
|
|
} catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) {
|
|
- logger.warn("解析http target失败: ss: {}", (Object) SpanAttributes);
|
|
|
|
|
|
+// logger.warn("解析http target失败: ss: {}", (Object) SpanAttributes);
|
|
return target;
|
|
return target;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -336,7 +336,7 @@ public class PojoSpan {
|
|
public String getHttpFlavor() {
|
|
public String getHttpFlavor() {
|
|
String flavor = getAttribute("", "http.flavor", "http.protocol").trim();
|
|
String flavor = getAttribute("", "http.flavor", "http.protocol").trim();
|
|
if (flavor.isEmpty()) {
|
|
if (flavor.isEmpty()) {
|
|
- logger.warn("解析http flavor失败: ss: {}", (Object) SpanAttributes);
|
|
|
|
|
|
+// logger.warn("解析http flavor失败: ss: {}", (Object) SpanAttributes);
|
|
return "";
|
|
return "";
|
|
}
|
|
}
|
|
String[] arr = flavor.split("/");
|
|
String[] arr = flavor.split("/");
|
|
@@ -356,7 +356,7 @@ public class PojoSpan {
|
|
URL url = (new URI(rawUrl)).toURL();
|
|
URL url = (new URI(rawUrl)).toURL();
|
|
return url.getHost();
|
|
return url.getHost();
|
|
} catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) {
|
|
} catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) {
|
|
- logger.warn("解析httpHost失败:{} ss: {}", e, this.SpanAttributes);
|
|
|
|
|
|
+// logger.warn("解析httpHost失败:{} ss: {}", e, this.SpanAttributes);
|
|
return host;
|
|
return host;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -368,13 +368,13 @@ public class PojoSpan {
|
|
public long getHttpStatusCode() {
|
|
public long getHttpStatusCode() {
|
|
String code = getAttribute("", "http.status_code", "http.response.status_code").trim();
|
|
String code = getAttribute("", "http.status_code", "http.response.status_code").trim();
|
|
if (code.isEmpty()) {
|
|
if (code.isEmpty()) {
|
|
- logger.warn("解析http code失败: spanAttribute: {}", (Object) SpanAttributes);
|
|
|
|
|
|
+// logger.warn("解析http code失败: spanAttribute: {}", (Object) SpanAttributes);
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
return Long.parseLong(code);
|
|
return Long.parseLong(code);
|
|
} catch (NumberFormatException e) {
|
|
} catch (NumberFormatException e) {
|
|
- logger.warn("http status code:[{}] not a number:{}", code, e);
|
|
|
|
|
|
+// logger.warn("http status code:[{}] not a number:{}", code, e);
|
|
return -1;
|
|
return -1;
|
|
}
|
|
}
|
|
}
|
|
}
|