-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#9584] Add LocalTraceRoot for DisableTrace
- Loading branch information
Showing
13 changed files
with
95 additions
and
108 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
51 changes: 4 additions & 47 deletions
51
profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/LocalTraceRoot.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 |
---|---|---|
@@ -1,56 +1,13 @@ | ||
package com.navercorp.pinpoint.profiler.context.id; | ||
|
||
import com.navercorp.pinpoint.bootstrap.context.TraceId; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* @author Woonduk Kang(emeroad) | ||
*/ | ||
public class LocalTraceRoot implements TraceRoot { | ||
|
||
private final String agentId; | ||
private final long localTransactionId; | ||
|
||
private final long traceStartTime; | ||
|
||
private final Shared shared = new DefaultShared(); | ||
|
||
|
||
public LocalTraceRoot(String agentId, long traceStartTime, long localTransactionId) { | ||
this.agentId = Objects.requireNonNull(agentId, "agentId"); | ||
this.traceStartTime = traceStartTime; | ||
this.localTransactionId = localTransactionId; | ||
} | ||
|
||
@Override | ||
public TraceId getTraceId() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public long getLocalTransactionId() { | ||
return localTransactionId; | ||
} | ||
|
||
|
||
@Override | ||
public long getTraceStartTime() { | ||
return traceStartTime; | ||
} | ||
|
||
public interface LocalTraceRoot { | ||
|
||
@Override | ||
public Shared getShared() { | ||
return shared; | ||
} | ||
long getLocalTransactionId(); | ||
|
||
long getTraceStartTime(); | ||
|
||
@Override | ||
public String toString() { | ||
return "DisableTraceRoot{" + | ||
", agentId='" + agentId + '\'' + | ||
", traceStartTime=" + traceStartTime + | ||
'}'; | ||
} | ||
Shared getShared(); | ||
} |
52 changes: 52 additions & 0 deletions
52
profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/LocalTraceRootImpl.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,52 @@ | ||
package com.navercorp.pinpoint.profiler.context.id; | ||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* @author Woonduk Kang(emeroad) | ||
*/ | ||
public class LocalTraceRootImpl implements LocalTraceRoot { | ||
|
||
protected final String agentId; | ||
protected final long localTransactionId; | ||
|
||
protected final long traceStartTime; | ||
|
||
protected final Shared shared = new DefaultShared(); | ||
|
||
|
||
LocalTraceRootImpl(String agentId, long traceStartTime, long localTransactionId) { | ||
this.agentId = Objects.requireNonNull(agentId, "agentId"); | ||
this.traceStartTime = traceStartTime; | ||
this.localTransactionId = localTransactionId; | ||
} | ||
|
||
public String getAgentId() { | ||
return agentId; | ||
} | ||
|
||
@Override | ||
public long getLocalTransactionId() { | ||
return localTransactionId; | ||
} | ||
|
||
@Override | ||
public long getTraceStartTime() { | ||
return traceStartTime; | ||
} | ||
|
||
|
||
@Override | ||
public Shared getShared() { | ||
return shared; | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
return "DefaultLocalTraceRoot{" + | ||
", agentId='" + agentId + '\'' + | ||
", traceStartTime=" + traceStartTime + | ||
'}'; | ||
} | ||
} |
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.