You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/08/14 12:18:07 UTC
[skywalking] branch master updated: fix: Fix
MultiScopesAnalysisListener#setPublicAttrs log warn frequently (#7271)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 4b66f1e fix: Fix MultiScopesAnalysisListener#setPublicAttrs log warn frequently (#7271)
4b66f1e is described below
commit 4b66f1e0a73bf6c107005be6d6acf040dc7cb6bd
Author: wallezhang <do...@gmail.com>
AuthorDate: Sat Aug 14 20:17:46 2021 +0800
fix: Fix MultiScopesAnalysisListener#setPublicAttrs log warn frequently (#7271)
* fix: Fix MultiScopesAnalysisListener#setPublicAttrs log warn frequently. #6562
1. Rename current STATUS_CODE to HTTP_RESPONSE_STATUS_CODE, real tag key should be http.status_code.
2. Add a new string tag RPC_RESPONSE_STATUS_CODE to hold all string type value tag. The key is `rpc.status_code`.
3. At the backend, keep responseCode for HTTP_RESPONSE_STATUS_CODE tag, but add @Deprecated. Also, add httpResponseStatusCode(a duplicate of responseCode) and rpcStatusCode(for RPC_RESPONSE_STATUS_CODE) fields for OAL.
* Modify `Tags.STATUS_CODE` field name to `Tags.HTTP_RESPONSE_STATUS_CODE` and type from `StringTag` to `IntegerTag`, add `Tags.RPC_RESPONSE_STATUS_CODE` field to hold rpc response code value.
* Add `rpcStatusCode` for `rpc.status_code` tag in the OAL objects. The `responseCode` field is marked as deprecated and replaced by `httpResponseStatusCode` field.
* Tag `status_code` is still supported in the backend for forward compatbility. Will be removed one year later.
Co-authored-by: 吴晟 Wu Sheng <wu...@foxmail.com>
---
CHANGES.md | 2 +
.../apm/agent/core/context/tag/IntegerTag.java | 43 ++++++++++------------
.../apm/agent/core/context/tag/Tags.java | 8 +++-
.../asynchttpclient/v2/AsyncHandlerWrapper.java | 2 +-
.../http/v9/DefaultHttpClientInterceptor.java | 2 +-
.../http/v9/LoadBalancerHttpClientInterceptor.java | 2 +-
.../plugin/grpc/v1/client/TracingClientCall.java | 20 +++++-----
.../plugin/grpc/v1/server/TracingServerCall.java | 9 +++--
.../v4/HttpClientExecuteInterceptor.java | 2 +-
.../wrapper/HttpAsyncResponseConsumerWrapper.java | 2 +-
.../v3/HttpClientExecuteInterceptor.java | 2 +-
.../plugin/jetty/v9/server/HandleInterceptor.java | 2 +-
.../jsonrpc4j/JsonServiceExporterInterceptor.java | 2 +-
.../plugin/light4j/HandleRequestInterceptor.java | 2 +-
.../nutz/http/sync/SenderSendInterceptor.java | 2 +-
.../plugin/nutz/mvc/ActionMethodInterceptor.java | 2 +-
.../plugin/okhttp/common/RealCallInterceptor.java | 2 +-
.../apm/plugin/play/v2x/TracingFilter.java | 2 +-
.../server/SynchronousDispatcherInterceptor.java | 2 +-
.../ProducerOperationHandlerInterceptor.java | 2 +-
.../TransportClientHandlerInterceptor.java | 2 +-
.../v1/ProducerOperationHandlerInterceptor.java | 2 +-
.../v1/TransportClientHandlerInterceptor.java | 2 +-
.../plugin/spring/mvc/v5/InvokeInterceptor.java | 2 +-
.../interceptor/AbstractMethodInterceptor.java | 2 +-
.../resttemplate/sync/RestResponseInterceptor.java | 2 +-
.../v5/webclient/WebFluxWebClientInterceptor.java | 2 +-
.../apm/plugin/struts2/Struts2Interceptor.java | 2 +-
.../plugin/tomcat78x/TomcatInvokeInterceptor.java | 2 +-
.../undertow/v2x/handler/TracingHandler.java | 2 +-
...ClientRequestImplHandleResponseInterceptor.java | 2 +-
...tpContextHandleDispatchResponseInterceptor.java | 2 +-
.../vertx3/HttpServerResponseImplInterceptor.java | 2 +-
.../jdk/http/HttpClientParseHttpInterceptor.java | 2 +-
.../gateway/v20x/HttpClientRequestInterceptor.java | 2 +-
...ientFinalizerResponseConnectionInterceptor.java | 2 +-
...ientFinalizerResponseConnectionInterceptor.java | 2 +-
.../DispatcherHandlerHandleMethodInterceptor.java | 10 ++---
docs/en/concepts-and-designs/scope-definitions.md | 28 ++++++++++----
docs/en/guides/Java-Plugin-Development-Guide.md | 2 +-
.../analyzer/provider/trace/parser/SpanTags.java | 9 +++++
.../listener/MultiScopesAnalysisListener.java | 11 ++++--
.../trace/parser/listener/SourceBuilder.java | 21 +++++++++++
.../skywalking/oap/server/core/source/All.java | 7 ++++
.../oap/server/core/source/Endpoint.java | 7 ++++
.../oap/server/core/source/EndpointRelation.java | 7 ++++
.../skywalking/oap/server/core/source/Service.java | 7 ++++
.../oap/server/core/source/ServiceInstance.java | 7 ++++
.../core/source/ServiceInstanceRelation.java | 7 ++++
.../oap/server/core/source/ServiceRelation.java | 7 ++++
.../server/receiver/trace/mock/ServiceAMock.java | 4 +-
.../listener/MultiScopesAnalysisListenerTest.java | 9 ++++-
.../config/expectedData.yaml | 2 +-
.../config/expectedData.yaml | 2 +-
.../config/expectedData.yaml | 4 +-
.../config/expectedData.yaml | 4 +-
.../gateway-3.x-scenario/config/expectedData.yaml | 4 +-
.../grpc-scenario/config/expectedData.yaml | 10 ++---
.../config/expectedData.yaml | 2 +-
.../config/expectedData.yaml | 2 +-
.../config/expectedData.yaml | 2 +-
.../config/expectedData.yaml | 8 ++--
.../config/expectedData.yaml | 16 ++++----
.../config/expectedData.yaml | 16 ++++----
.../webflux-scenario/config/expectedData.yaml | 26 ++++++-------
65 files changed, 248 insertions(+), 139 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 4f21273..efb4f49 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -14,6 +14,7 @@ Release Notes.
#### Java Agent
* Support Multiple DNS period resolving mechanism
+* Modify `Tags.STATUS_CODE` field name to `Tags.HTTP_RESPONSE_STATUS_CODE` and type from `StringTag` to `IntegerTag`, add `Tags.RPC_RESPONSE_STATUS_CODE` field to hold rpc response code value.
#### OAP-Backend
@@ -36,6 +37,7 @@ Release Notes.
* [Break Change] Remove endpoint name in the backend log query condition. Only support `query by endpoint id`.
* [Break Change] Fix typo for a column `page_path_id`(was `pate_path_id`) of storage entity `browser_error_log`.
* Add component id for Python falcon plugin.
+* Add `rpcStatusCode` for `rpc.status_code` tag. The `responseCode` field is marked as deprecated and replaced by `httpResponseStatusCode` field.
#### UI
diff --git a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/SpanTags.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/IntegerTag.java
similarity index 50%
copy from oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/SpanTags.java
copy to apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/IntegerTag.java
index 982d5e8..d951662 100644
--- a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/SpanTags.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/IntegerTag.java
@@ -16,34 +16,29 @@
*
*/
-package org.apache.skywalking.oap.server.analyzer.provider.trace.parser;
+package org.apache.skywalking.apm.agent.core.context.tag;
+
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
/**
- * Reserved keys of the span. The backend analysis the metrics according the existed tags.
+ * A subclass of {@link AbstractTag}, represent a tag with a {@link Integer} value.
*/
-public class SpanTags {
- public static final String STATUS_CODE = "status_code";
+public class IntegerTag extends AbstractTag<Integer> {
+
+ public IntegerTag(int id, String tagKey, boolean canOverwrite) {
+ super(id, tagKey, canOverwrite);
+ }
- public static final String DB_STATEMENT = "db.statement";
+ public IntegerTag(String key) {
+ super(key);
+ }
- public static final String DB_TYPE = "db.type";
+ public IntegerTag(int id, String tagKey) {
+ super(id, tagKey, false);
+ }
- /**
- * Tag, x-le(extension logic endpoint) series tag. Value is JSON format.
- * <pre>
- * {
- * "name": "GraphQL-service",
- * "latency": 100,
- * "status": true
- * }
- * </pre>
- *
- * Also, could use value to indicate this local span is representing a logic endpoint.
- * <pre>
- * {
- * "logic-span": true
- * }
- * </pre>
- */
- public static final String LOGIC_ENDPOINT = "x-le";
+ @Override
+ public void set(AbstractSpan span, Integer tagValue) {
+ span.tag(this, Integer.toString(tagValue));
+ }
}
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java
index f911d06..50d20d0 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/Tags.java
@@ -40,7 +40,7 @@ public final class Tags {
/**
* STATUS_CODE records the http status code of the response.
*/
- public static final StringTag STATUS_CODE = new StringTag(2, "status_code", true);
+ public static final IntegerTag HTTP_RESPONSE_STATUS_CODE = new IntegerTag(2, "http.status_code", true);
/**
* DB_TYPE records database type, such as sql, redis, cassandra and so on.
@@ -90,6 +90,12 @@ public final class Tags {
*/
public static final StringTag TRANSMISSION_LATENCY = new StringTag(15, "transmission.latency", false);
+ /**
+ * RESPONSE_CODE records the code string of the response. This is different from status code, which is
+ * used to record http response code.
+ */
+ public static final StringTag RPC_RESPONSE_STATUS_CODE = new StringTag(18, "rpc.status_code", true);
+
public static final class HTTP {
public static final StringTag METHOD = new StringTag(10, "http.method");
diff --git a/apm-sniffer/apm-sdk-plugin/asynchttpclient-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asynchttpclient/v2/AsyncHandlerWrapper.java b/apm-sniffer/apm-sdk-plugin/asynchttpclient-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asynchttpclient/v2/AsyncHandlerWrapper.java
index c668231..faebf47 100644
--- a/apm-sniffer/apm-sdk-plugin/asynchttpclient-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asynchttpclient/v2/AsyncHandlerWrapper.java
+++ b/apm-sniffer/apm-sdk-plugin/asynchttpclient-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asynchttpclient/v2/AsyncHandlerWrapper.java
@@ -51,7 +51,7 @@ public class AsyncHandlerWrapper implements AsyncHandler {
@Override
public State onStatusReceived(final HttpResponseStatus httpResponseStatus) throws Exception {
int statusCode = httpResponseStatus.getStatusCode();
- Tags.STATUS_CODE.set(asyncSpan, String.valueOf(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(asyncSpan, statusCode);
if (statusCode >= 400) {
asyncSpan.errorOccurred();
}
diff --git a/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java b/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
index 6b91d15..f254b8a 100644
--- a/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
@@ -156,7 +156,7 @@ public class DefaultHttpClientInterceptor implements InstanceMethodsAroundInterc
AbstractSpan span = ContextManager.activeSpan();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/LoadBalancerHttpClientInterceptor.java b/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/LoadBalancerHttpClientInterceptor.java
index 000c281..720c07f 100644
--- a/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/LoadBalancerHttpClientInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/LoadBalancerHttpClientInterceptor.java
@@ -83,7 +83,7 @@ public class LoadBalancerHttpClientInterceptor implements InstanceMethodsAroundI
AbstractSpan span = ContextManager.activeSpan();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/TracingClientCall.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/TracingClientCall.java
index fc3a585..81dc21a 100644
--- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/TracingClientCall.java
+++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/TracingClientCall.java
@@ -18,6 +18,15 @@
package org.apache.skywalking.apm.plugin.grpc.v1.client;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.BLOCKING_CALL_EXIT_SPAN;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.CLIENT;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_CANCEL_OPERATION_NAME;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_COMPLETE_OPERATION_NAME;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_MESSAGE_OPERATION_NAME;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_CLOSE_OPERATION_NAME;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_MESSAGE_OPERATION_NAME;
+import static org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil.formatOperationName;
+
import io.grpc.Channel;
import io.grpc.ClientCall;
import io.grpc.ForwardingClientCall;
@@ -36,15 +45,6 @@ import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.BLOCKING_CALL_EXIT_SPAN;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.CLIENT;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_CANCEL_OPERATION_NAME;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_COMPLETE_OPERATION_NAME;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.REQUEST_ON_MESSAGE_OPERATION_NAME;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_CLOSE_OPERATION_NAME;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_MESSAGE_OPERATION_NAME;
-import static org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil.formatOperationName;
-
/**
* Fully client tracing for gRPC servers.
*/
@@ -199,7 +199,7 @@ class TracingClientCall<REQUEST, RESPONSE> extends ForwardingClientCall.SimpleFo
ContextManager.continued(contextSnapshot);
if (!status.isOk()) {
span.log(status.asRuntimeException());
- Tags.STATUS_CODE.set(span, status.getCode().name());
+ Tags.RPC_RESPONSE_STATUS_CODE.set(span, status.getCode().name());
}
try {
diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java
index d554346..6693542 100644
--- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java
+++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java
@@ -18,6 +18,10 @@
package org.apache.skywalking.apm.plugin.grpc.v1.server;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_CLOSE_OPERATION_NAME;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_MESSAGE_OPERATION_NAME;
+import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.SERVER;
+
import io.grpc.ForwardingServerCall;
import io.grpc.Metadata;
import io.grpc.ServerCall;
@@ -27,9 +31,6 @@ import org.apache.skywalking.apm.agent.core.context.tag.Tags;
import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_CLOSE_OPERATION_NAME;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.RESPONSE_ON_MESSAGE_OPERATION_NAME;
-import static org.apache.skywalking.apm.plugin.grpc.v1.Constants.SERVER;
import org.apache.skywalking.apm.plugin.grpc.v1.OperationNameFormatUtil;
public class TracingServerCall<REQUEST, RESPONSE> extends ForwardingServerCall.SimpleForwardingServerCall<REQUEST, RESPONSE> {
@@ -91,7 +92,7 @@ public class TracingServerCall<REQUEST, RESPONSE> extends ForwardingServerCall.S
}
break;
}
- Tags.STATUS_CODE.set(span, status.getCode().name());
+ Tags.RPC_RESPONSE_STATUS_CODE.set(span, status.getCode().name());
try {
super.close(status, trailers);
diff --git a/apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
index 38edb70..e6a7410 100644
--- a/apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
@@ -91,7 +91,7 @@ public class HttpClientExecuteInterceptor implements InstanceMethodsAroundInterc
AbstractSpan span = ContextManager.activeSpan();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
HttpRequest httpRequest = (HttpRequest) allArguments[1];
// Active HTTP parameter collection automatically in the profiling context.
diff --git a/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/HttpAsyncResponseConsumerWrapper.java b/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/HttpAsyncResponseConsumerWrapper.java
index 4cbe2f6..147fe72 100644
--- a/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/HttpAsyncResponseConsumerWrapper.java
+++ b/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/HttpAsyncResponseConsumerWrapper.java
@@ -49,7 +49,7 @@ public class HttpAsyncResponseConsumerWrapper<T> implements HttpAsyncResponseCon
int statusCode = response.getStatusLine().getStatusCode();
if (statusCode >= 400) {
AbstractSpan span = ContextManager.activeSpan().errorOccurred();
- Tags.STATUS_CODE.set(span, String.valueOf(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
ContextManager.stopSpan();
}
diff --git a/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
index b23990c..fa367e2 100644
--- a/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
@@ -77,7 +77,7 @@ public class HttpClientExecuteInterceptor implements InstanceMethodsAroundInterc
final AbstractSpan span = ContextManager.activeSpan();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
final HttpMethod httpMethod = (HttpMethod) allArguments[1];
if (httpMethod == null) {
diff --git a/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-server-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server/HandleInterceptor.java b/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-server-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server/HandleInterceptor.java
index d872fdc..85250d6 100644
--- a/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-server-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server/HandleInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-server-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server/HandleInterceptor.java
@@ -73,7 +73,7 @@ public class HandleInterceptor implements InstanceMethodsAroundInterceptor {
AbstractSpan span = ContextManager.activeSpan();
if (IS_SERVLET_GET_STATUS_METHOD_EXIST && servletResponse.getStatus() >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(servletResponse.getStatus()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, servletResponse.getStatus());
}
ContextManager.stopSpan();
ContextManager.getRuntimeContext().remove(Constants.FORWARD_REQUEST_FLAG);
diff --git a/apm-sniffer/apm-sdk-plugin/jsonrpc4j-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jsonrpc4j/JsonServiceExporterInterceptor.java b/apm-sniffer/apm-sdk-plugin/jsonrpc4j-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jsonrpc4j/JsonServiceExporterInterceptor.java
index ebd5add..3be6ee4 100644
--- a/apm-sniffer/apm-sdk-plugin/jsonrpc4j-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jsonrpc4j/JsonServiceExporterInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/jsonrpc4j-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jsonrpc4j/JsonServiceExporterInterceptor.java
@@ -68,7 +68,7 @@ public class JsonServiceExporterInterceptor implements InstanceMethodsAroundInte
HttpServletResponse response = (HttpServletResponse) objects[1];
AbstractSpan span = ContextManager.activeSpan();
if (IS_SERVLET_GET_STATUS_METHOD_EXIST) {
- Tags.STATUS_CODE.set(span, String.valueOf(response.getStatus()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, response.getStatus());
}
ContextManager.stopSpan();
diff --git a/apm-sniffer/apm-sdk-plugin/light4j-plugins/light4j-plugin/src/main/java/org/apache/skywalking/apm/plugin/light4j/HandleRequestInterceptor.java b/apm-sniffer/apm-sdk-plugin/light4j-plugins/light4j-plugin/src/main/java/org/apache/skywalking/apm/plugin/light4j/HandleRequestInterceptor.java
index 09a035c..92c7b7e 100644
--- a/apm-sniffer/apm-sdk-plugin/light4j-plugins/light4j-plugin/src/main/java/org/apache/skywalking/apm/plugin/light4j/HandleRequestInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/light4j-plugins/light4j-plugin/src/main/java/org/apache/skywalking/apm/plugin/light4j/HandleRequestInterceptor.java
@@ -76,7 +76,7 @@ public class HandleRequestInterceptor implements InstanceMethodsAroundIntercepto
if (exchange.getStatusCode() >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, String.valueOf(exchange.getStatusCode()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, exchange.getStatusCode());
}
ContextManager.stopSpan(span);
diff --git a/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java b/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java
index 22faeee..1807321 100644
--- a/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java
@@ -68,7 +68,7 @@ public class SenderSendInterceptor implements InstanceMethodsAroundInterceptor {
if (response == null || response.getStatus() >= 400) {
span.errorOccurred();
if (response != null)
- Tags.STATUS_CODE.set(span, Integer.toString(response.getStatus()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, response.getStatus());
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/apm-sdk-plugin/nutz-plugins/mvc-annotation-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/mvc/ActionMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/nutz-plugins/mvc-annotation-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/mvc/ActionMethodInterceptor.java
index 143f39e..67a02a4 100644
--- a/apm-sniffer/apm-sdk-plugin/nutz-plugins/mvc-annotation-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/mvc/ActionMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/nutz-plugins/mvc-annotation-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/mvc/ActionMethodInterceptor.java
@@ -76,7 +76,7 @@ public class ActionMethodInterceptor implements InstanceMethodsAroundInterceptor
AbstractSpan span = ContextManager.activeSpan();
if (response.getStatus() >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(response.getStatus()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, response.getStatus());
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/apm-sdk-plugin/okhttp-common/src/main/java/org/apache/skywalking/apm/plugin/okhttp/common/RealCallInterceptor.java b/apm-sniffer/apm-sdk-plugin/okhttp-common/src/main/java/org/apache/skywalking/apm/plugin/okhttp/common/RealCallInterceptor.java
index 089bbc4..c944649 100644
--- a/apm-sniffer/apm-sdk-plugin/okhttp-common/src/main/java/org/apache/skywalking/apm/plugin/okhttp/common/RealCallInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/okhttp-common/src/main/java/org/apache/skywalking/apm/plugin/okhttp/common/RealCallInterceptor.java
@@ -107,7 +107,7 @@ public class RealCallInterceptor implements InstanceMethodsAroundInterceptor, In
AbstractSpan span = ContextManager.activeSpan();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java
index 32914b3..bb0ce3b 100644
--- a/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java
+++ b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java
@@ -80,7 +80,7 @@ public class TracingFilter extends Filter {
CompletionStage<Result> stage = next.apply(request).thenApply(result -> {
if (result.status() >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(result.status()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, result.status());
}
try {
span.asyncFinish();
diff --git a/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherInterceptor.java b/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherInterceptor.java
index 78aff12..2930b19 100644
--- a/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherInterceptor.java
@@ -61,7 +61,7 @@ public class SynchronousDispatcherInterceptor implements InstanceMethodsAroundIn
AbstractSpan span = ContextManager.activeSpan();
if (response.getStatus() >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(response.getStatus()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, response.getStatus());
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java
index 9f3e854..07cf029 100644
--- a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java
@@ -59,7 +59,7 @@ public class ProducerOperationHandlerInterceptor implements InstanceMethodsAroun
int statusCode = invocation.getStatus().getStatusCode();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/TransportClientHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/TransportClientHandlerInterceptor.java
index 17ee3f8..c505a2a 100644
--- a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/TransportClientHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/TransportClientHandlerInterceptor.java
@@ -68,7 +68,7 @@ public class TransportClientHandlerInterceptor implements InstanceMethodsAroundI
int statusCode = invocation.getStatus().getStatusCode();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/ProducerOperationHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/ProducerOperationHandlerInterceptor.java
index 80150c7..c9e0a23 100644
--- a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/ProducerOperationHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/ProducerOperationHandlerInterceptor.java
@@ -59,7 +59,7 @@ public class ProducerOperationHandlerInterceptor implements InstanceMethodsAroun
int statusCode = invocation.getStatus().getStatusCode();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/TransportClientHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/TransportClientHandlerInterceptor.java
index 9686b5c..9debb8b 100644
--- a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/TransportClientHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/TransportClientHandlerInterceptor.java
@@ -68,7 +68,7 @@ public class TransportClientHandlerInterceptor implements InstanceMethodsAroundI
int statusCode = invocation.getStatus().getStatusCode();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v5/InvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v5/InvokeInterceptor.java
index 50eb1ea..7a19cdf 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v5/InvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/v5/InvokeInterceptor.java
@@ -73,7 +73,7 @@ public class InvokeInterceptor implements InstanceMethodsAroundInterceptorV2 {
HttpStatus httpStatus = exchange.getResponse().getStatusCode();
if (httpStatus != null && httpStatus.isError()) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(httpStatus.value()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, httpStatus.value());
}
span.asyncFinish();
});
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
index c6121a6..9e8493a 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
@@ -229,7 +229,7 @@ public abstract class AbstractMethodInterceptor implements InstanceMethodsAround
if (statusCode != null && statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
runtimeContext.remove(REACTIVE_ASYNC_SPAN_IN_RUNTIME_CONTEXT);
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestResponseInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestResponseInterceptor.java
index bc2b35e..121444a 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestResponseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestResponseInterceptor.java
@@ -44,7 +44,7 @@ public class RestResponseInterceptor implements InstanceMethodsAroundInterceptor
AbstractSpan span = ContextManager.activeSpan();
if (statusCode >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(statusCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, statusCode);
}
return ret;
}
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/spring-webflux-5.x-webclient-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/webclient/WebFluxWebClientInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/spring-webflux-5.x-webclient-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/webclient/WebFluxWebClientInterceptor.java
index a32272f..dd386d3 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/spring-webflux-5.x-webclient-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/webclient/WebFluxWebClientInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/spring-webflux-5.x-webclient-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/webclient/WebFluxWebClientInterceptor.java
@@ -81,7 +81,7 @@ public class WebFluxWebClientInterceptor implements InstanceMethodsAroundInterce
return ret1.doOnSuccess(clientResponse -> {
HttpStatus httpStatus = clientResponse.statusCode();
if (httpStatus != null) {
- Tags.STATUS_CODE.set(span, Integer.toString(httpStatus.value()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, httpStatus.value());
if (httpStatus.isError()) {
span.errorOccurred();
}
diff --git a/apm-sniffer/apm-sdk-plugin/struts2-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/struts2/Struts2Interceptor.java b/apm-sniffer/apm-sdk-plugin/struts2-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/struts2/Struts2Interceptor.java
index 1fc63b0..70f2db9 100644
--- a/apm-sniffer/apm-sdk-plugin/struts2-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/struts2/Struts2Interceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/struts2-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/struts2/Struts2Interceptor.java
@@ -71,7 +71,7 @@ public class Struts2Interceptor implements InstanceMethodsAroundInterceptor {
AbstractSpan span = ContextManager.activeSpan();
if (IS_SERVLET_GET_STATUS_METHOD_EXIST && response.getStatus() >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(response.getStatus()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, response.getStatus());
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
index f54ab78..326e2a9 100644
--- a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
@@ -95,7 +95,7 @@ public class TomcatInvokeInterceptor implements InstanceMethodsAroundInterceptor
AbstractSpan span = ContextManager.activeSpan();
if (IS_SERVLET_GET_STATUS_METHOD_EXIST && response.getStatus() >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(response.getStatus()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, response.getStatus());
}
// Active HTTP parameter collection automatically in the profiling context.
if (!TomcatPluginConfig.Plugin.Tomcat.COLLECT_HTTP_PARAMS && span.isProfiling()) {
diff --git a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/handler/TracingHandler.java b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/handler/TracingHandler.java
index 8bf79f5..d41c299 100644
--- a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/handler/TracingHandler.java
+++ b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/handler/TracingHandler.java
@@ -72,7 +72,7 @@ public class TracingHandler implements HttpHandler {
nextListener.proceed();
if (httpServerExchange.getStatusCode() >= 400) {
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(httpServerExchange.getStatusCode()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, httpServerExchange.getStatusCode());
}
span.asyncFinish();
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java
index d1ed6fa..087551d 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java
@@ -40,7 +40,7 @@ public class HttpClientRequestImplHandleResponseInterceptor implements InstanceM
HttpClientRequestContext requestContext = (HttpClientRequestContext) objInst.getSkyWalkingDynamicField();
if (!requestContext.usingWebClient) {
VertxContext context = requestContext.vertxContext;
- Tags.STATUS_CODE.set(context.getSpan(), Integer.toString(((HttpClientResponse) allArguments[0]).statusCode()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(context.getSpan(), ((HttpClientResponse) allArguments[0]).statusCode());
context.getSpan().asyncFinish();
AbstractSpan span = ContextManager.createLocalSpan("#" + context.getSpan().getOperationName());
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextHandleDispatchResponseInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextHandleDispatchResponseInterceptor.java
index 3629a0c..18e0d93 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextHandleDispatchResponseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextHandleDispatchResponseInterceptor.java
@@ -42,7 +42,7 @@ public class HttpContextHandleDispatchResponseInterceptor implements InstanceMet
HttpClientRequest clientRequest = httpContext.clientRequest();
VertxContext context = ((HttpClientRequestContext) ((EnhancedInstance) clientRequest)
.getSkyWalkingDynamicField()).vertxContext;
- Tags.STATUS_CODE.set(context.getSpan(), Integer.toString(httpContext.clientResponse().statusCode()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(context.getSpan(), httpContext.clientResponse().statusCode());
context.getSpan().asyncFinish();
AbstractSpan span = ContextManager.createLocalSpan("#" + context.getSpan().getOperationName());
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplInterceptor.java
index c68ead8..ae9fb51 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplInterceptor.java
@@ -43,7 +43,7 @@ public class HttpServerResponseImplInterceptor implements InstanceMethodsAroundI
if ((VertxContext.VERTX_VERSION < 36 && allArguments[0] instanceof ByteBuf)
|| ((VertxContext.VERTX_VERSION >= 36 && VertxContext.VERTX_VERSION <= 37) || allArguments.length == 2)) {
VertxContext context = (VertxContext) objInst.getSkyWalkingDynamicField();
- Tags.STATUS_CODE.set(context.getSpan(), Integer.toString(((HttpServerResponse) objInst).getStatusCode()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(context.getSpan(), ((HttpServerResponse) objInst).getStatusCode());
context.getSpan().asyncFinish();
}
}
diff --git a/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientParseHttpInterceptor.java b/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientParseHttpInterceptor.java
index a409ad2..0231510 100644
--- a/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientParseHttpInterceptor.java
+++ b/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientParseHttpInterceptor.java
@@ -46,7 +46,7 @@ public class HttpClientParseHttpInterceptor implements InstanceMethodsAroundInte
if (responseCode >= 400) {
AbstractSpan span = ContextManager.activeSpan();
span.errorOccurred();
- Tags.STATUS_CODE.set(span, Integer.toString(responseCode));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, responseCode);
}
ContextManager.stopSpan();
return ret;
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java
index e055979..a063030 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java
@@ -92,7 +92,7 @@ public class HttpClientRequestInterceptor implements InstanceMethodsAroundInterc
} else if (httpClientResponse.status().code() > 400) {
abstractSpan.errorOccurred();
}
- Tags.STATUS_CODE.set(abstractSpan, String.valueOf(httpClientResponse.status().code()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(abstractSpan, httpClientResponse.status().code());
abstractSpan.asyncFinish();
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v21x/HttpClientFinalizerResponseConnectionInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v21x/HttpClientFinalizerResponseConnectionInterceptor.java
index 9c9fd19..1d67b7c 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v21x/HttpClientFinalizerResponseConnectionInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v21x/HttpClientFinalizerResponseConnectionInterceptor.java
@@ -43,7 +43,7 @@ public class HttpClientFinalizerResponseConnectionInterceptor implements Instanc
if (response.status().code() >= 400) {
cache.getSpan().errorOccurred();
}
- Tags.STATUS_CODE.set(cache.getSpan(), String.valueOf(response.status().code()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(cache.getSpan(), response.status().code());
cache.getSpan().asyncFinish();
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/HttpClientFinalizerResponseConnectionInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/HttpClientFinalizerResponseConnectionInterceptor.java
index eef52f4..0ef159d 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/HttpClientFinalizerResponseConnectionInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/HttpClientFinalizerResponseConnectionInterceptor.java
@@ -52,7 +52,7 @@ public class HttpClientFinalizerResponseConnectionInterceptor implements Instanc
if (response.status().code() >= HttpResponseStatus.BAD_REQUEST.code()) {
cache.getSpan().errorOccurred();
}
- Tags.STATUS_CODE.set(cache.getSpan(), String.valueOf(response.status().code()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(cache.getSpan(), response.status().code());
cache.getSpan().asyncFinish();
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/DispatcherHandlerHandleMethodInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/DispatcherHandlerHandleMethodInterceptor.java
index 915f76b..e40584e 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/DispatcherHandlerHandleMethodInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/DispatcherHandlerHandleMethodInterceptor.java
@@ -62,7 +62,7 @@ public class DispatcherHandlerHandleMethodInterceptor implements InstanceMethods
}
AbstractSpan span = ContextManager.createEntrySpan(exchange.getRequest().getURI().getPath(), carrier);
-
+
if (instance != null && instance.getSkyWalkingDynamicField() != null) {
ContextManager.continued((ContextSnapshot) instance.getSkyWalkingDynamicField());
}
@@ -76,7 +76,7 @@ public class DispatcherHandlerHandleMethodInterceptor implements InstanceMethods
exchange.getAttributes().put("SKYWALING_SPAN", span);
}
-
+
private void maybeSetPattern(AbstractSpan span, ServerWebExchange exchange) {
if (span != null) {
PathPattern pathPattern = exchange.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
@@ -95,17 +95,17 @@ public class DispatcherHandlerHandleMethodInterceptor implements InstanceMethods
ServerWebExchange exchange = (ServerWebExchange) allArguments[0];
AbstractSpan span = (AbstractSpan) exchange.getAttributes().get("SKYWALING_SPAN");
-
+
return ((Mono) ret).doFinally(s -> {
if (span != null) {
maybeSetPattern(span, exchange);
try {
-
+
HttpStatus httpStatus = exchange.getResponse().getStatusCode();
// fix webflux-2.0.0-2.1.0 version have bug. httpStatus is null. not support
if (httpStatus != null) {
- Tags.STATUS_CODE.set(span, Integer.toString(httpStatus.value()));
+ Tags.HTTP_RESPONSE_STATUS_CODE.set(span, httpStatus.value());
if (httpStatus.isError()) {
span.errorOccurred();
}
diff --git a/docs/en/concepts-and-designs/scope-definitions.md b/docs/en/concepts-and-designs/scope-definitions.md
index 812f777..146368a 100644
--- a/docs/en/concepts-and-designs/scope-definitions.md
+++ b/docs/en/concepts-and-designs/scope-definitions.md
@@ -10,7 +10,9 @@ Using the Aggregation Function, the requests will be grouped by time and **Group
| endpoint | The endpoint path of each request. | | string |
| latency | The time taken by each request. | | int(in ms) |
| status | The success or failure of the request. | | bool(true for success) |
-| responseCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| ~~responseCode~~ | Deprecated.The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| rpcStatusCode | The string value of the rpc response code. | | string |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
@@ -26,7 +28,9 @@ This calculates the metrics data from each request of the service.
| endpointName | The name of the endpoint, such as a full path of HTTP URI. | | string |
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request. | | bool(true for success) |
-| responseCode | The response code of the HTTP response, if this request is an HTTP call. | | int|
+| ~~responseCode~~ | Deprecated.The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| rpcStatusCode | The string value of the rpc response code. | | string |
| type | The type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum |
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string|
@@ -45,7 +49,9 @@ This calculates the metrics data from each request of the service instance.
| endpointName | The name of the endpoint, such as a full path of the HTTP URI. | | string|
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request. | | bool(true for success) |
-| responseCode | The response code of HTTP response, if this request is an HTTP call. | | int |
+| ~~responseCode~~ | Deprecated.The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| rpcStatusCode | The string value of the rpc response code. | | string |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string|
@@ -134,7 +140,9 @@ This calculates the metrics data from each request of the endpoint in the servic
| serviceInstanceName | The name of the service instance ID. | | string |
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request.| | bool(true for success) |
-| responseCode | The response code of HTTP response, if this request is an HTTP call. | | int |
+| ~~responseCode~~ | Deprecated.The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| rpcStatusCode | The string value of the rpc response code. | | string |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| tags | The labels of each request. Each value is made up by `TagKey:TagValue` in the segment. | | `List<String>` |
| sideCar.internalErrorCode | The sidecar/gateway proxy internal error code. The value is based on the implementation. | | string|
@@ -157,7 +165,9 @@ This calculates the metrics data from each request between services.
| componentId | The ID of component used in this call. | yes | string
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request.| | bool(true for success) |
-| responseCode | The response code of HTTP response, if this request is an HTTP call. | | int |
+| ~~responseCode~~ | Deprecated.The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| rpcStatusCode | The string value of the rpc response code. | | string |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| detectPoint | Where the relation is detected. The value may be client, server, or proxy. | yes | enum|
| tlsMode | The TLS mode between source and destination services, such as `service_relation_mtls_cpm = from(ServiceRelation.*).filter(tlsMode == "mTLS").cpm()` || string|
@@ -181,7 +191,9 @@ This calculates the metrics data from each request between service instances.
| componentId | The ID of the component used in this call. | yes | string
| latency | The time taken by each request. | | int |
| status | Indicates the success or failure of the request.| | bool(true for success) |
-| responseCode | The response code of the HTTP response, if this request is an HTTP call. | | int |
+| ~~responseCode~~ | Deprecated.The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| rpcStatusCode | The string value of the rpc response code. | | string |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| detectPoint | Where the relation is detected. The value may be client, server, or proxy. | yes | enum|
| tlsMode | The TLS mode between source and destination service instances, such as `service_instance_relation_mtls_cpm = from(ServiceInstanceRelation.*).filter(tlsMode == "mTLS").cpm()` || string|
@@ -208,7 +220,9 @@ including auto instrument agents (like Java and .NET), OpenCensus SkyWalking exp
| rpcLatency | The latency of the RPC between the parent endpoint and childEndpoint, excluding the latency caused by the parent endpoint itself.
| componentId | The ID of the component used in this call. | yes | string
| status | Indicates the success or failure of the request.| | bool(true for success) |
-| responseCode | The response code of the HTTP response, if this request is an HTTP call. | | int |
+| ~~responseCode~~ | Deprecated.The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| httpResponseStatusCode | The response code of the HTTP response, and if this request is the HTTP call. E.g. 200, 404, 302| | int |
+| rpcStatusCode | The string value of the rpc response code. | | string |
| type | The type of each request, such as Database, HTTP, RPC, or gRPC. | | enum |
| detectPoint | Indicates where the relation is detected. The value may be client, server, or proxy. | yes | enum|
diff --git a/docs/en/guides/Java-Plugin-Development-Guide.md b/docs/en/guides/Java-Plugin-Development-Guide.md
index 757b060..7fca22b 100644
--- a/docs/en/guides/Java-Plugin-Development-Guide.md
+++ b/docs/en/guides/Java-Plugin-Development-Guide.md
@@ -159,7 +159,7 @@ For extension of the component name/ID, please follow the [component library def
### Special Span Tags
All tags are available in the trace view. Meanwhile, in the OAP backend analysis, some special tags or tag combinations provide other advanced features.
-#### Tag key `status_code`
+#### Tag key `http.status_code`
The value should be an integer. The response code of OAL entities corresponds to this value.
#### Tag keys `db.statement` and `db.type`.
diff --git a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/SpanTags.java b/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/SpanTags.java
index 982d5e8..6260ed0 100644
--- a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/SpanTags.java
+++ b/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/SpanTags.java
@@ -22,8 +22,17 @@ package org.apache.skywalking.oap.server.analyzer.provider.trace.parser;
* Reserved keys of the span. The backend analysis the metrics according the existed tags.
*/
public class SpanTags {
+ public static final String HTTP_RESPONSE_STATUS_CODE = "http.status_code";
+ /**
+ * Deprecated. The old status_code tag, in order to be compatible with the old version of agent.
+ * It should be replaced by {@link #HTTP_RESPONSE_STATUS_CODE} or using
+ * {@link #RPC_RESPONSE_STATUS_CODE} if status code is related to a rpc call.
+ */
+ @Deprecated
public static final String STATUS_CODE = "status_code";
+ public static final String RPC_RESPONSE_STATUS_CODE = "rpc.status_code";
+
public static final String DB_STATEMENT = "db.statement";
public static final String DB_TYPE = "db.type";
diff --git a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/MultiScopesAnalysisListener.java b/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/MultiScopesAnalysisListener.java
index 7aae0fa..927fd0d 100644
--- a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/MultiScopesAnalysisListener.java
+++ b/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/MultiScopesAnalysisListener.java
@@ -18,6 +18,8 @@
package org.apache.skywalking.oap.server.analyzer.provider.trace.parser.listener;
+import static org.apache.skywalking.oap.server.analyzer.provider.trace.parser.SpanTags.LOGIC_ENDPOINT;
+
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.ArrayList;
@@ -49,8 +51,6 @@ import org.apache.skywalking.oap.server.core.source.ServiceInstanceRelation;
import org.apache.skywalking.oap.server.core.source.SourceReceiver;
import org.apache.skywalking.oap.server.library.module.ModuleManager;
-import static org.apache.skywalking.oap.server.analyzer.provider.trace.parser.SpanTags.LOGIC_ENDPOINT;
-
/**
* MultiScopesSpanListener includes the most segment to source(s) logic.
*
@@ -239,13 +239,18 @@ public class MultiScopesAnalysisListener implements EntryAnalysisListener, ExitA
sourceBuilder.setTimeBucket(TimeBucket.getMinuteTimeBucket(span.getStartTime()));
sourceBuilder.setLatency((int) latency);
sourceBuilder.setResponseCode(Const.NONE);
+ sourceBuilder.setHttpResponseStatusCode(Const.NONE);
span.getTagsList().forEach(tag -> {
- if (SpanTags.STATUS_CODE.equals(tag.getKey())) {
+ final String tagKey = tag.getKey();
+ if (SpanTags.STATUS_CODE.equals(tagKey) || SpanTags.HTTP_RESPONSE_STATUS_CODE.equals(tagKey)) {
try {
sourceBuilder.setResponseCode(Integer.parseInt(tag.getValue()));
+ sourceBuilder.setHttpResponseStatusCode(Integer.parseInt(tag.getValue()));
} catch (NumberFormatException e) {
log.warn("span {} has illegal status code {}", span, tag.getValue());
}
+ } else if (SpanTags.RPC_RESPONSE_STATUS_CODE.equals(tagKey)) {
+ sourceBuilder.setRpcStatusCode(tag.getValue());
}
sourceBuilder.setTag(tag);
});
diff --git a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/SourceBuilder.java b/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/SourceBuilder.java
index c5e243b..589f90e 100644
--- a/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/SourceBuilder.java
+++ b/oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/SourceBuilder.java
@@ -85,9 +85,16 @@ class SourceBuilder {
private boolean status;
@Getter
@Setter
+ @Deprecated
private int responseCode;
@Getter
@Setter
+ private int httpResponseStatusCode;
+ @Getter
+ @Setter
+ private String rpcStatusCode;
+ @Getter
+ @Setter
private RequestType type;
@Getter
@Setter
@@ -119,6 +126,8 @@ class SourceBuilder {
all.setLatency(latency);
all.setStatus(status);
all.setResponseCode(responseCode);
+ all.setHttpResponseStatusCode(httpResponseStatusCode);
+ all.setRpcStatusCode(rpcStatusCode);
all.setType(type);
all.setTimeBucket(timeBucket);
all.setTags(tags);
@@ -137,6 +146,8 @@ class SourceBuilder {
service.setLatency(latency);
service.setStatus(status);
service.setResponseCode(responseCode);
+ service.setHttpResponseStatusCode(httpResponseStatusCode);
+ service.setRpcStatusCode(rpcStatusCode);
service.setType(type);
service.setTags(tags);
service.setTimeBucket(timeBucket);
@@ -159,6 +170,8 @@ class SourceBuilder {
serviceRelation.setLatency(latency);
serviceRelation.setStatus(status);
serviceRelation.setResponseCode(responseCode);
+ serviceRelation.setHttpResponseStatusCode(httpResponseStatusCode);
+ serviceRelation.setRpcStatusCode(rpcStatusCode);
serviceRelation.setType(type);
serviceRelation.setDetectPoint(detectPoint);
serviceRelation.setTimeBucket(timeBucket);
@@ -178,6 +191,8 @@ class SourceBuilder {
serviceInstance.setLatency(latency);
serviceInstance.setStatus(status);
serviceInstance.setResponseCode(responseCode);
+ serviceInstance.setHttpResponseStatusCode(httpResponseStatusCode);
+ serviceInstance.setRpcStatusCode(rpcStatusCode);
serviceInstance.setType(type);
serviceInstance.setTags(tags);
serviceInstance.setTimeBucket(timeBucket);
@@ -203,6 +218,8 @@ class SourceBuilder {
serviceInstanceRelation.setLatency(latency);
serviceInstanceRelation.setStatus(status);
serviceInstanceRelation.setResponseCode(responseCode);
+ serviceInstanceRelation.setHttpResponseStatusCode(httpResponseStatusCode);
+ serviceInstanceRelation.setRpcStatusCode(rpcStatusCode);
serviceInstanceRelation.setType(type);
serviceInstanceRelation.setDetectPoint(detectPoint);
serviceInstanceRelation.setTimeBucket(timeBucket);
@@ -221,6 +238,8 @@ class SourceBuilder {
endpoint.setLatency(latency);
endpoint.setStatus(status);
endpoint.setResponseCode(responseCode);
+ endpoint.setHttpResponseStatusCode(httpResponseStatusCode);
+ endpoint.setRpcStatusCode(rpcStatusCode);
endpoint.setType(type);
endpoint.setTags(tags);
endpoint.setTimeBucket(timeBucket);
@@ -252,6 +271,8 @@ class SourceBuilder {
endpointRelation.setRpcLatency(latency);
endpointRelation.setStatus(status);
endpointRelation.setResponseCode(responseCode);
+ endpointRelation.setHttpResponseStatusCode(httpResponseStatusCode);
+ endpointRelation.setRpcStatusCode(rpcStatusCode);
endpointRelation.setType(type);
endpointRelation.setDetectPoint(detectPoint);
endpointRelation.setTimeBucket(timeBucket);
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/All.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/All.java
index 7c81c47..8d7be47 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/All.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/All.java
@@ -53,9 +53,16 @@ public class All extends Source {
private boolean status;
@Getter
@Setter
+ @Deprecated
private int responseCode;
@Getter
@Setter
+ private int httpResponseStatusCode;
+ @Getter
+ @Setter
+ private String rpcStatusCode;
+ @Getter
+ @Setter
private RequestType type;
@Getter
@Setter
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Endpoint.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Endpoint.java
index c5c438d..57b5e2e 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Endpoint.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Endpoint.java
@@ -72,9 +72,16 @@ public class Endpoint extends Source {
private boolean status;
@Getter
@Setter
+ @Deprecated
private int responseCode;
@Getter
@Setter
+ private int httpResponseStatusCode;
+ @Getter
+ @Setter
+ private String rpcStatusCode;
+ @Getter
+ @Setter
private RequestType type;
@Getter
@Setter
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/EndpointRelation.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/EndpointRelation.java
index 77b5cea..665a416 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/EndpointRelation.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/EndpointRelation.java
@@ -83,9 +83,16 @@ public class EndpointRelation extends Source {
private boolean status;
@Getter
@Setter
+ @Deprecated
private int responseCode;
@Getter
@Setter
+ private int httpResponseStatusCode;
+ @Getter
+ @Setter
+ private String rpcStatusCode;
+ @Getter
+ @Setter
private RequestType type;
@Getter
@Setter
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java
index 07a2c65..ba4891d 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Service.java
@@ -67,9 +67,16 @@ public class Service extends Source {
private boolean status;
@Getter
@Setter
+ @Deprecated
private int responseCode;
@Getter
@Setter
+ private int httpResponseStatusCode;
+ @Getter
+ @Setter
+ private String rpcStatusCode;
+ @Getter
+ @Setter
private RequestType type;
@Getter
@Setter
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstance.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstance.java
index b93742c..5099aed 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstance.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstance.java
@@ -70,9 +70,16 @@ public class ServiceInstance extends Source {
private boolean status;
@Getter
@Setter
+ @Deprecated
private int responseCode;
@Getter
@Setter
+ private int httpResponseStatusCode;
+ @Getter
+ @Setter
+ private String rpcStatusCode;
+ @Getter
+ @Setter
private RequestType type;
@Getter
@Setter
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstanceRelation.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstanceRelation.java
index 775561a..c41212f 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstanceRelation.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceInstanceRelation.java
@@ -92,9 +92,16 @@ public class ServiceInstanceRelation extends Source {
private boolean status;
@Getter
@Setter
+ @Deprecated
private int responseCode;
@Getter
@Setter
+ private int httpResponseStatusCode;
+ @Getter
+ @Setter
+ private String rpcStatusCode;
+ @Getter
+ @Setter
private RequestType type;
@Getter
@Setter
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceRelation.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceRelation.java
index 9b13d71..4b6668a 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceRelation.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/ServiceRelation.java
@@ -86,9 +86,16 @@ public class ServiceRelation extends Source {
private boolean status;
@Getter
@Setter
+ @Deprecated
private int responseCode;
@Getter
@Setter
+ private int httpResponseStatusCode;
+ @Getter
+ @Setter
+ private String rpcStatusCode;
+ @Getter
+ @Setter
private RequestType type;
@Getter
@Setter
diff --git a/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/trace/mock/ServiceAMock.java b/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/trace/mock/ServiceAMock.java
index 6192eb5..41d6b3c 100644
--- a/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/trace/mock/ServiceAMock.java
+++ b/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/trace/mock/ServiceAMock.java
@@ -64,8 +64,8 @@ class ServiceAMock {
span.setOperationName(REST_ENDPOINT);
span.setIsError(false);
span.addTags(KeyStringValuePair.newBuilder().setKey("http.method").setValue("get").build());
- span.addTags(KeyStringValuePair.newBuilder().setKey("status_code").setValue("404").build());
- span.addTags(KeyStringValuePair.newBuilder().setKey("status_code").setValue("200").build());
+ span.addTags(KeyStringValuePair.newBuilder().setKey("http.status_code").setValue("404").build());
+ span.addTags(KeyStringValuePair.newBuilder().setKey("http.status_code").setValue("200").build());
return span;
}
diff --git a/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/trace/provider/parser/listener/MultiScopesAnalysisListenerTest.java b/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/trace/provider/parser/listener/MultiScopesAnalysisListenerTest.java
index 5d37e70..dad8813 100644
--- a/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/trace/provider/parser/listener/MultiScopesAnalysisListenerTest.java
+++ b/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/test/java/org/apache/skywalking/oap/server/receiver/trace/provider/parser/listener/MultiScopesAnalysisListenerTest.java
@@ -134,10 +134,15 @@ public class MultiScopesAnalysisListenerTest {
.setSpanType(SpanType.Entry)
.addTags(
KeyStringValuePair.newBuilder()
- .setKey(SpanTags.STATUS_CODE)
+ .setKey(SpanTags.HTTP_RESPONSE_STATUS_CODE)
.setValue("500")
.build()
)
+ .addTags(
+ KeyStringValuePair.newBuilder()
+ .setKey(SpanTags.RPC_RESPONSE_STATUS_CODE)
+ .setValue("OK")
+ .build())
.build();
final SegmentObject segment = SegmentObject.newBuilder()
.setService("mock-service")
@@ -158,6 +163,8 @@ public class MultiScopesAnalysisListenerTest {
final EndpointRelation endpointRelation = (EndpointRelation) receivedSources.get(6);
Assert.assertEquals("mock-service", service.getName());
Assert.assertEquals(500, service.getResponseCode());
+ Assert.assertEquals(500, service.getHttpResponseStatusCode());
+ Assert.assertEquals("OK", service.getRpcStatusCode());
Assert.assertFalse(service.isStatus());
Assert.assertEquals("mock-instance", serviceInstance.getName());
Assert.assertEquals("/springMVC", endpoint.getName());
diff --git a/test/plugin/scenarios/asynchttpclient-scenario/config/expectedData.yaml b/test/plugin/scenarios/asynchttpclient-scenario/config/expectedData.yaml
index 1db379f..c422508 100644
--- a/test/plugin/scenarios/asynchttpclient-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/asynchttpclient-scenario/config/expectedData.yaml
@@ -34,7 +34,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: 'http://localhost:8080/asynchttpclient/back'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- operationName: /asynchttpclient/case
operationId: 0
parentSpanId: -1
diff --git a/test/plugin/scenarios/correlation-autotag-scenario/config/expectedData.yaml b/test/plugin/scenarios/correlation-autotag-scenario/config/expectedData.yaml
index 3c39f92..6167a67 100644
--- a/test/plugin/scenarios/correlation-autotag-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/correlation-autotag-scenario/config/expectedData.yaml
@@ -213,7 +213,7 @@ segmentItems:
peer: ''
skipAnalysis: false
tags:
- - {key: status_code, value: OK}
+ - {key: rpc.status_code, value: OK}
- operationName: Greeter.sayHello/server/Request/onComplete
operationId: 0
parentSpanId: -1
diff --git a/test/plugin/scenarios/gateway-2.0.x-scenario/config/expectedData.yaml b/test/plugin/scenarios/gateway-2.0.x-scenario/config/expectedData.yaml
index bdc66a3..2eae775 100644
--- a/test/plugin/scenarios/gateway-2.0.x-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/gateway-2.0.x-scenario/config/expectedData.yaml
@@ -57,7 +57,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:8080/provider/b/testcase'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
skipAnalysis: 'false'
- segmentId: not null
spans:
@@ -74,7 +74,7 @@ segmentItems:
peer: 'localhost:18070'
tags:
- {key: url, value: not null}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
skipAnalysis: 'false'
- operationName: SpringCloudGateway/RoutingFilter
operationId: 0
diff --git a/test/plugin/scenarios/gateway-2.1.x-scenario/config/expectedData.yaml b/test/plugin/scenarios/gateway-2.1.x-scenario/config/expectedData.yaml
index bdc66a3..2eae775 100644
--- a/test/plugin/scenarios/gateway-2.1.x-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/gateway-2.1.x-scenario/config/expectedData.yaml
@@ -57,7 +57,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:8080/provider/b/testcase'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
skipAnalysis: 'false'
- segmentId: not null
spans:
@@ -74,7 +74,7 @@ segmentItems:
peer: 'localhost:18070'
tags:
- {key: url, value: not null}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
skipAnalysis: 'false'
- operationName: SpringCloudGateway/RoutingFilter
operationId: 0
diff --git a/test/plugin/scenarios/gateway-3.x-scenario/config/expectedData.yaml b/test/plugin/scenarios/gateway-3.x-scenario/config/expectedData.yaml
index bdc66a3..2eae775 100644
--- a/test/plugin/scenarios/gateway-3.x-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/gateway-3.x-scenario/config/expectedData.yaml
@@ -57,7 +57,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:8080/provider/b/testcase'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
skipAnalysis: 'false'
- segmentId: not null
spans:
@@ -74,7 +74,7 @@ segmentItems:
peer: 'localhost:18070'
tags:
- {key: url, value: not null}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
skipAnalysis: 'false'
- operationName: SpringCloudGateway/RoutingFilter
operationId: 0
diff --git a/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml b/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml
index 28258ed..8ddf28c 100644
--- a/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml
@@ -169,7 +169,7 @@ segmentItems:
spanType: Local
peer: ''
tags:
- - {key: status_code, value: OK}
+ - {key: rpc.status_code, value: OK}
skipAnalysis: 'false'
- operationName: GreeterBlocking.sayHello/server/Request/onComplete
operationId: 0
@@ -231,7 +231,7 @@ segmentItems:
spanType: Local
peer: ''
tags:
- - {key: status_code, value: OK}
+ - {key: rpc.status_code, value: OK}
skipAnalysis: 'false'
- operationName: Greeter.sayHello/server/Request/onComplete
operationId: 0
@@ -317,7 +317,7 @@ segmentItems:
spanType: Local
peer: ''
tags:
- - {key: status_code, value: UNKNOWN}
+ - {key: rpc.status_code, value: UNKNOWN}
logs:
- logEvent:
- {key: event, value: error}
@@ -370,7 +370,7 @@ segmentItems:
spanType: Local
peer: ''
tags:
- - {key: status_code, value: UNKNOWN}
+ - {key: rpc.status_code, value: UNKNOWN}
logs:
- logEvent:
- {key: event, value: error}
@@ -428,7 +428,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:8080/grpc-scenario/case/grpc-scenario'}
- {key: http.method, value: GET}
- - {key: status_code, value: '500'}
+ - {key: http.status_code, value: '500'}
logs:
- logEvent:
- {key: event, value: error}
diff --git a/test/plugin/scenarios/jsonrpc4j-1.x-scenario/config/expectedData.yaml b/test/plugin/scenarios/jsonrpc4j-1.x-scenario/config/expectedData.yaml
index 3d4a452..9bdfe3c 100644
--- a/test/plugin/scenarios/jsonrpc4j-1.x-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/jsonrpc4j-1.x-scenario/config/expectedData.yaml
@@ -77,7 +77,7 @@ segmentItems:
value: 'http://localhost:8080/jsonrpc4j-1.x-scenario/path/to/demo-service',
}
- { key: jsonrpc.method, value: sayHello }
- - { key: status_code, value: '200' }
+ - { key: http.status_code, value: '200' }
refs:
- {
parentEndpoint: /jsonrpc4j-1.x-scenario/case/json-rpc,
diff --git a/test/plugin/scenarios/springmvc-reactive-devtools-scenario/config/expectedData.yaml b/test/plugin/scenarios/springmvc-reactive-devtools-scenario/config/expectedData.yaml
index 95dd650..3751817 100644
--- a/test/plugin/scenarios/springmvc-reactive-devtools-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/springmvc-reactive-devtools-scenario/config/expectedData.yaml
@@ -93,7 +93,7 @@ segmentItems:
tags:
- {key: url, value: not null}
- {key: http.method, value: GET}
- - {key: status_code, value: '500'}
+ - {key: http.status_code, value: '500'}
logs:
- logEvent:
- {key: event, value: error}
diff --git a/test/plugin/scenarios/springmvc-reactive-scenario/config/expectedData.yaml b/test/plugin/scenarios/springmvc-reactive-scenario/config/expectedData.yaml
index 160ca06..f603562 100644
--- a/test/plugin/scenarios/springmvc-reactive-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/springmvc-reactive-scenario/config/expectedData.yaml
@@ -93,7 +93,7 @@ segmentItems:
tags:
- {key: url, value: not null}
- {key: http.method, value: GET}
- - {key: status_code, value: '500'}
+ - {key: http.status_code, value: '500'}
logs:
- logEvent:
- {key: event, value: error}
diff --git a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml
index 2375114..6fc6978 100644
--- a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml
@@ -46,7 +46,7 @@ segmentItems:
tags:
- {key: http.method, value: HEAD}
- {key: url, value: '/vertx-eventbus-3-scenario/case/healthCheck'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- segmentId: not null
spans:
- operationName: local-message-receiver
@@ -97,7 +97,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-eventbus-3-scenario/case/executeTest'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- operationName: org.apache.skywalking.apm.testcase.vertxeventbus.controller.VertxEventbusController$$Lambda$.handle(RoutingContext)
operationId: 0
parentSpanId: 0
@@ -125,7 +125,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-eventbus-3-scenario/case/eventbus-case'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- segmentId: not null
spans:
- operationName: '#/vertx-eventbus-3-scenario/case/executeTest'
@@ -207,7 +207,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-eventbus-3-scenario/case/executeTest'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: '{GET}/vertx-eventbus-3-scenario/case/eventbus-case', networkAddress: 'localhost:8080',
refType: CrossProcess, parentSpanId: 2, parentTraceSegmentId: not null,
diff --git a/test/plugin/scenarios/vertx-web-3.54minus-scenario/config/expectedData.yaml b/test/plugin/scenarios/vertx-web-3.54minus-scenario/config/expectedData.yaml
index df7a69a..4b918dd 100644
--- a/test/plugin/scenarios/vertx-web-3.54minus-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/vertx-web-3.54minus-scenario/config/expectedData.yaml
@@ -46,7 +46,7 @@ segmentItems:
tags:
- {key: http.method, value: HEAD}
- {key: url, value: '/vertx-web-3_54minus-scenario/case/healthCheck'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- segmentId: not null
spans:
- operationName: '/vertx-web-3_54minus-scenario/dynamicEndpoint/100'
@@ -64,7 +64,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_54minus-scenario/dynamicEndpoint/100'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- operationName: '/vertx-web-3_54minus-scenario/case/healthCheck'
operationId: 0
parentSpanId: 1
@@ -80,7 +80,7 @@ segmentItems:
tags:
- {key: http.method, value: HEAD}
- {key: url, value: '/vertx-web-3_54minus-scenario/case/healthCheck'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- operationName: org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId: 0
parentSpanId: 0
@@ -108,7 +108,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_54minus-scenario/case/web-case'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- segmentId: not null
spans:
- operationName: org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
@@ -138,7 +138,7 @@ segmentItems:
tags:
- {key: http.method, value: HEAD}
- {key: url, value: '/vertx-web-3_54minus-scenario/case/healthCheck'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: '{GET}/vertx-web-3_54minus-scenario/case/web-case', networkAddress: 'localhost:8080',
refType: CrossProcess, parentSpanId: 3, parentTraceSegmentId: not null,
@@ -173,7 +173,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_54minus-scenario/dynamicEndpoint/100'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: '{GET}/vertx-web-3_54minus-scenario/case/web-case', networkAddress: 'localhost:8080',
refType: CrossProcess, parentSpanId: 2, parentTraceSegmentId: not null,
@@ -208,7 +208,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: '#/vertx-web-3_54minus-scenario/case/healthCheck', networkAddress: 'localhost:8080',
refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: not null,
@@ -269,7 +269,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_54minus-scenario/case/web-case/withBodyHandler'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- operationName: '#/vertx-web-3_54minus-scenario/case/healthCheck'
operationId: 0
parentSpanId: -1
diff --git a/test/plugin/scenarios/vertx-web-3.6plus-scenario/config/expectedData.yaml b/test/plugin/scenarios/vertx-web-3.6plus-scenario/config/expectedData.yaml
index 5de5e8f..7289b5d 100644
--- a/test/plugin/scenarios/vertx-web-3.6plus-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/vertx-web-3.6plus-scenario/config/expectedData.yaml
@@ -46,7 +46,7 @@ segmentItems:
tags:
- {key: http.method, value: HEAD}
- {key: url, value: '/vertx-web-3_6plus-scenario/case/healthCheck'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- segmentId: not null
spans:
- operationName: '/vertx-web-3_6plus-scenario/dynamicEndpoint/100'
@@ -64,7 +64,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_6plus-scenario/dynamicEndpoint/100'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- operationName: '/vertx-web-3_6plus-scenario/case/healthCheck'
operationId: 0
parentSpanId: 1
@@ -80,7 +80,7 @@ segmentItems:
tags:
- {key: http.method, value: HEAD}
- {key: url, value: '/vertx-web-3_6plus-scenario/case/healthCheck'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- operationName: org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
operationId: 0
parentSpanId: 0
@@ -108,7 +108,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_6plus-scenario/case/web-case'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- segmentId: not null
spans:
- operationName: org.apache.skywalking.apm.testcase.vertxweb.controller.VertxWebController$$Lambda$.handle(RoutingContext)
@@ -138,7 +138,7 @@ segmentItems:
tags:
- {key: http.method, value: HEAD}
- {key: url, value: '/vertx-web-3_6plus-scenario/case/healthCheck'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: '{GET}/vertx-web-3_6plus-scenario/case/web-case', networkAddress: 'localhost:8080',
refType: CrossProcess, parentSpanId: 3, parentTraceSegmentId: not null,
@@ -173,7 +173,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_6plus-scenario/dynamicEndpoint/100'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: '{GET}/vertx-web-3_6plus-scenario/case/web-case', networkAddress: 'localhost:8080',
refType: CrossProcess, parentSpanId: 2, parentTraceSegmentId: not null,
@@ -208,7 +208,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: '#/vertx-web-3_6plus-scenario/case/healthCheck', networkAddress: 'localhost:8080',
refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: not null,
@@ -269,7 +269,7 @@ segmentItems:
tags:
- {key: http.method, value: GET}
- {key: url, value: '/vertx-web-3_6plus-scenario/case/web-case/withBodyHandler'}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
- operationName: '#/vertx-web-3_6plus-scenario/case/healthCheck'
operationId: 0
parentSpanId: -1
diff --git a/test/plugin/scenarios/webflux-scenario/config/expectedData.yaml b/test/plugin/scenarios/webflux-scenario/config/expectedData.yaml
index d6c62c7..d2d5bf0 100644
--- a/test/plugin/scenarios/webflux-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/webflux-scenario/config/expectedData.yaml
@@ -33,7 +33,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/testcase/annotation/success'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -55,7 +55,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/testcase/annotation/error'}
- {key: http.method, value: GET}
- - {key: status_code, value: '500'}
+ - {key: http.status_code, value: '500'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 2, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -77,7 +77,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/testcase/annotation/foo'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 3, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -99,7 +99,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/testcase/annotation/loo'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 4, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -121,7 +121,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/testcase/route/success'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 5, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -143,7 +143,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/testcase/route/error'}
- {key: http.method, value: GET}
- - {key: status_code, value: '500'}
+ - {key: http.status_code, value: '500'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 6, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -165,7 +165,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/notFound'}
- {key: http.method, value: GET}
- - {key: status_code, value: '404'}
+ - {key: http.status_code, value: '404'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 7, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -187,7 +187,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/testcase/annotation/mono/hello'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 8, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -209,7 +209,7 @@ segmentItems:
tags:
- {key: url, value: 'http://localhost:18080/testcase/webclient/server'}
- {key: http.method, value: GET}
- - {key: status_code, value: '200'}
+ - {key: http.status_code, value: '200'}
refs:
- {parentEndpoint: /projectA/testcase, networkAddress: 'localhost:18080', refType: CrossProcess,
parentSpanId: 9, parentTraceSegmentId: not null, parentServiceInstance: not
@@ -249,7 +249,7 @@ segmentItems:
tags:
- {key: url, value: not null}
- {key: http.method, value: GET}
- - {key: status_code, value: '500'}
+ - {key: http.status_code, value: '500'}
skipAnalysis: 'false'
- operationName: /testcase/annotation/foo
operationId: 0
@@ -310,7 +310,7 @@ segmentItems:
tags:
- {key: url, value: not null}
- {key: http.method, value: GET}
- - {key: status_code, value: '500'}
+ - {key: http.status_code, value: '500'}
skipAnalysis: 'false'
- operationName: /notFound
operationId: 0
@@ -326,7 +326,7 @@ segmentItems:
tags:
- {key: url, value: not null}
- {key: http.method, value: GET}
- - {key: status_code, value: '404'}
+ - {key: http.status_code, value: '404'}
skipAnalysis: 'false'
- operationName: /testcase/annotation/mono/hello
operationId: 0
@@ -357,7 +357,7 @@ segmentItems:
tags:
- {key: url, value: not null}
- {key: http.method, value: GET}
- - {key: status_code, value:'200'}
+ - {key: http.status_code, value: '200'}
skipAnalysis: 'false'
- operationName: /projectA/testcase
operationId: 0