kezhenxu94 commented on a change in pull request #5408:
URL: https://github.com/apache/skywalking/pull/5408#discussion_r479318243
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/TracingContext.java
##########
@@ -438,20 +434,7 @@ private void finish() {
if (isFinishedInMainThread && (!isRunningInAsyncMode ||
asyncSpanCounter == 0)) {
TraceSegment finishedSegment =
segment.finish(isLimitMechanismWorking());
- /*
- * Recheck the segment if the segment contains only one span.
- * Because in the runtime, can't sure this segment is part of
distributed trace.
- *
- * @see {@link #createSpan(String, long, boolean)}
- */
- if (!segment.hasRef() && segment.isSingleSpanSegment()) {
- if (!SAMPLING_SERVICE.trySampling()) {
Review comment:
Seems the variable `SAMPLING_SERVICE` is not used anywhere now and can
be removed (line 69)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]