fix recording url tag with wrong port (#6214)
This commit is contained in:
parent
4e43f227b4
commit
ea8a4963a2
|
|
@ -34,6 +34,7 @@ Release Notes.
|
|||
* Fix duplicated `EnhancedInstance` interface added.
|
||||
* Fix thread leaks caused by the elasticsearch-6.x-plugin plugin.
|
||||
* Support reading segmentId and spanId with toolkit.
|
||||
* Fix RestTemplate plugin recording url tag with wrong port
|
||||
|
||||
|
||||
#### OAP-Backend
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ public class RestExecuteInterceptor implements InstanceMethodsAroundInterceptor
|
|||
AbstractSpan span = ContextManager.createExitSpan(uri, contextCarrier, remotePeer);
|
||||
|
||||
span.setComponent(ComponentsDefine.SPRING_REST_TEMPLATE);
|
||||
Tags.URL.set(span, requestURL.getScheme() + "://" + requestURL.getHost() + ":" + requestURL.getPort() + requestURL
|
||||
.getPath());
|
||||
Tags.URL.set(span, requestURL.getScheme() + "://" + requestURL.getHost() +
|
||||
(requestURL.getPort() > 0 ? ":" + requestURL.getPort() : "") + requestURL.getPath());
|
||||
Tags.HTTP.METHOD.set(span, httpMethod.toString());
|
||||
SpanLayer.asHttp(span);
|
||||
RestTemplateRuntimeContextHelper.addUri(uri);
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ public class RestExecuteInterceptor implements InstanceMethodsAroundInterceptor
|
|||
AbstractSpan span = ContextManager.createExitSpan(formatURIPath, contextCarrier, remotePeer);
|
||||
|
||||
span.setComponent(ComponentsDefine.SPRING_REST_TEMPLATE);
|
||||
Tags.URL.set(span, requestURL.getScheme() + "://" + requestURL.getHost() + ":" + requestURL.getPort() + requestURL
|
||||
.getPath());
|
||||
Tags.URL.set(span, requestURL.getScheme() + "://" + requestURL.getHost() +
|
||||
(requestURL.getPort() > 0 ? ":" + requestURL.getPort() : "") + requestURL.getPath());
|
||||
Tags.HTTP.METHOD.set(span, httpMethod.toString());
|
||||
SpanLayer.asHttp(span);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ segmentItems:
|
|||
spanType: Exit
|
||||
peer: github.com:443
|
||||
tags:
|
||||
- {key: url, value: 'https://github.com:-1/apache/skywalking'}
|
||||
- {key: url, value: 'https://github.com/apache/skywalking'}
|
||||
- {key: http.method, value: GET}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Threading/test.apache.skywalking.apm.testcase.jdk.threading.Application$TestController$1/run
|
||||
|
|
@ -81,7 +81,7 @@ segmentItems:
|
|||
spanType: Exit
|
||||
peer: github.com:443
|
||||
tags:
|
||||
- {key: url, value: 'https://github.com:-1/apache/skywalking'}
|
||||
- {key: url, value: 'https://github.com/apache/skywalking'}
|
||||
- {key: http.method, value: GET}
|
||||
skipAnalysis: 'false'
|
||||
- operationName: Threading/test.apache.skywalking.apm.testcase.jdk.threading.Application$TestController$2/call
|
||||
|
|
|
|||
Loading…
Reference in New Issue