-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Extract span and scope implementations from tracer class
Remove unused eligibleForDropping method
- Loading branch information
1 parent
f677ee0
commit 2a4a5ad
Showing
44 changed files
with
943 additions
and
774 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...tstrap/src/main/java/datadog/trace/bootstrap/instrumentation/api/Java8BytecodeBridge.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,30 @@ | ||
package datadog.trace.bootstrap.instrumentation.api; | ||
|
||
/** | ||
* A helper for accessing methods that rely on new Java 8 bytecode features such as calling a static | ||
* interface methods. In instrumentation, we may need to call these methods in code that is inlined | ||
* into an instrumented class, however many times the instrumented class has been compiled to a | ||
* previous version of bytecode, and so we cannot inline calls to static interface methods, as those | ||
* were not supported prior to Java 8 and will lead to a class verification error. | ||
*/ | ||
public class Java8BytecodeBridge { | ||
/** @see AgentScope#noop() */ | ||
public static AgentScope noopScope() { | ||
return AgentScope.noop(); | ||
} | ||
|
||
/** @see AgentSpanContext#noop() */ | ||
public static AgentSpanContext noopSpanContext() { | ||
return AgentSpanContext.noop(); | ||
} | ||
|
||
/** @see AgentTracer#noopSpan() */ | ||
public static AgentSpan noopSpan() { | ||
return AgentTracer.noopSpan(); | ||
} | ||
|
||
/** @see AgentTracer#blackholeSpan() */ | ||
public static AgentSpan blackHoleSpan() { | ||
return AgentTracer.blackholeSpan(); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.