Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide ignore mechanism for TracerContext.
- Loading branch information
Showing
7 changed files
with
122 additions
and
32 deletions.
There are no files selected for viewing
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
63 changes: 63 additions & 0 deletions
63
...er/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/context/trace/NoopSpan.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,63 @@ | ||
package org.skywalking.apm.agent.core.context.trace; | ||
|
||
import java.util.Map; | ||
import org.skywalking.apm.agent.core.context.IgnoredTracerContext; | ||
|
||
/** | ||
* The <code>NoopSpan</code> represents a span implementation without any actual operation. | ||
* This span implementation is for {@link IgnoredTracerContext}. | ||
* | ||
* @author wusheng | ||
*/ | ||
public class NoopSpan implements AbstractSpan { | ||
@Override | ||
public AbstractSpan setOperationName(String operationName) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public void setPeerHost(String peerHost) { | ||
|
||
} | ||
|
||
@Override | ||
public void setPort(int port) { | ||
|
||
} | ||
|
||
@Override | ||
public void setPeers(String peers) { | ||
|
||
} | ||
|
||
@Override | ||
public AbstractSpan setTag(String key, String value) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public AbstractSpan setTag(String key, boolean value) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public AbstractSpan setTag(String key, Integer value) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public AbstractSpan log(Map<String, String> fields) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public AbstractSpan log(Throwable t) { | ||
return this; | ||
} | ||
|
||
@Override | ||
public AbstractSpan log(String event) { | ||
return this; | ||
} | ||
|
||
} |
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