cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [cxf] 01/03: CXF-7439: Support OpenTracing Tracer API. Adding HTTP response code tag to server and client.
Date Tue, 12 Sep 2017 09:55:17 GMT
This is an automated email from the ASF dual-hosted git repository.

sergeyb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit c63c2100546fa10f454ce80c88a819795c503bf0
Author: reta <drreta@gmail.com>
AuthorDate: Sun Sep 10 15:28:28 2017 -0400

    CXF-7439: Support OpenTracing Tracer API. Adding HTTP response code tag to server and
client.
---
 .../cxf/tracing/opentracing/AbstractOpenTracingClientProvider.java    | 4 +++-
 .../apache/cxf/tracing/opentracing/AbstractOpenTracingProvider.java   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingClientProvider.java
b/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingClientProvider.java
index 8a1bdd7..fac0147 100644
--- a/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingClientProvider.java
+++ b/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingClientProvider.java
@@ -36,7 +36,8 @@ import io.opentracing.propagation.Format.Builtin;
 public abstract class AbstractOpenTracingClientProvider extends AbstractTracingProvider {
     protected static final Logger LOG = LogUtils.getL7dLogger(AbstractOpenTracingClientProvider.class);
     protected static final String TRACE_SPAN = "org.apache.cxf.tracing.client.opentracing.span";
-
+    protected static final String HTTP_STATUS_TAG = "http.status";
+    
     private final Tracer tracer;
 
     public AbstractOpenTracingClientProvider(final Tracer tracer) {
@@ -86,6 +87,7 @@ public abstract class AbstractOpenTracingClientProvider extends AbstractTracingP
                 span = scope.getContinuation().activate();
             }
 
+            span.setTag(HTTP_STATUS_TAG, responseStatus);
             if (scope.isManaged()) {
                 span.close();
             }
diff --git a/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingProvider.java
b/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingProvider.java
index 2c41c38..7d337f2 100644
--- a/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingProvider.java
+++ b/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingProvider.java
@@ -38,7 +38,8 @@ import io.opentracing.propagation.TextMapExtractAdapter;
 public abstract class AbstractOpenTracingProvider extends AbstractTracingProvider {
     protected static final Logger LOG = LogUtils.getL7dLogger(AbstractOpenTracingProvider.class);
     protected static final String TRACE_SPAN = "org.apache.cxf.tracing.opentracing.span";
-
+    protected static final String HTTP_STATUS_TAG = "http.status";
+    
     protected final Tracer tracer;
     
     protected AbstractOpenTracingProvider(final Tracer tracer) {
@@ -97,6 +98,7 @@ public abstract class AbstractOpenTracingProvider extends AbstractTracingProvide
                 span = scope.getContinuation().activate();
             }
 
+            span.setTag(HTTP_STATUS_TAG, responseStatus);
             span.close();
         }
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@cxf.apache.org" <commits@cxf.apache.org>.

Mime
View raw message