cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cxf git commit: CXF-7439: Support OpenTracing Tracer API. Adding HTTP response code tag to server and client.
Date Sun, 10 Sep 2017 19:28:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/master ec7a52968 -> c63c21005


CXF-7439: Support OpenTracing Tracer API. Adding HTTP response code tag to server and client.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c63c2100
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c63c2100
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c63c2100

Branch: refs/heads/master
Commit: c63c2100546fa10f454ce80c88a819795c503bf0
Parents: ec7a529
Author: reta <drreta@gmail.com>
Authored: Sun Sep 10 15:28:28 2017 -0400
Committer: reta <drreta@gmail.com>
Committed: Sun Sep 10 15:28:28 2017 -0400

----------------------------------------------------------------------
 .../tracing/opentracing/AbstractOpenTracingClientProvider.java   | 4 +++-
 .../cxf/tracing/opentracing/AbstractOpenTracingProvider.java     | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c63c2100/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingClientProvider.java
----------------------------------------------------------------------
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();
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c63c2100/integration/tracing/tracing-opentracing/src/main/java/org/apache/cxf/tracing/opentracing/AbstractOpenTracingProvider.java
----------------------------------------------------------------------
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();
         }
     }


Mime
View raw message