-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make active span be ignored by default; used as parent span if config…
…ured (#110) * Make active span be ignored by default; used as parent span if configured. The ensures that the damage caused by accidental thread local leakage between requests is minimized Fixes #109 * empty commit to refresh PR * Changes based on review comments from @pavolloffay
- Loading branch information
1 parent
189a62e
commit 1228471
Showing
9 changed files
with
132 additions
and
16 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...java/io/opentracing/contrib/jaxrs2/itest/cxf/ApacheCXFParentSpanIgnoredByDefaultTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.opentracing.contrib.jaxrs2.itest.cxf; | ||
|
||
import io.opentracing.contrib.jaxrs2.itest.common.AbstractParentSpanResolutionTest; | ||
import org.eclipse.jetty.servlet.ServletContextHandler; | ||
|
||
public class ApacheCXFParentSpanIgnoredByDefaultTest extends AbstractParentSpanResolutionTest { | ||
|
||
@Override | ||
protected boolean shouldUseParentSpan() { | ||
return false; | ||
} | ||
|
||
@Override | ||
protected void initServletContext(ServletContextHandler context) { | ||
super.initServletContext(context); | ||
ApacheCXFHelper.initServletContext(context); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...java/io/opentracing/contrib/jaxrs2/itest/jersey/JerseyParentSpanIgnoredByDefaultTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.opentracing.contrib.jaxrs2.itest.jersey; | ||
|
||
import io.opentracing.contrib.jaxrs2.itest.common.AbstractParentSpanResolutionTest; | ||
import org.eclipse.jetty.servlet.ServletContextHandler; | ||
|
||
public class JerseyParentSpanIgnoredByDefaultTest extends AbstractParentSpanResolutionTest{ | ||
@Override | ||
protected boolean shouldUseParentSpan() { | ||
return true; | ||
} | ||
|
||
@Override | ||
protected void initServletContext(ServletContextHandler context) { | ||
super.initServletContext(context); | ||
JerseyHelper.initServletContext(context); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../io/opentracing/contrib/jaxrs2/itest/resteasy/RestEasyParentSpanIgnoredByDefaultTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.opentracing.contrib.jaxrs2.itest.resteasy; | ||
|
||
import io.opentracing.contrib.jaxrs2.itest.common.AbstractParentSpanResolutionTest; | ||
import org.eclipse.jetty.servlet.ServletContextHandler; | ||
|
||
public class RestEasyParentSpanIgnoredByDefaultTest extends AbstractParentSpanResolutionTest { | ||
|
||
@Override | ||
protected boolean shouldUseParentSpan() { | ||
return true; | ||
} | ||
|
||
protected void initServletContext(ServletContextHandler context) { | ||
super.initServletContext(context); | ||
RestEasyHelper.initServletContext(context); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters