qxo commented on a change in pull request #3068: improve
ContextManager.stopSpan performance: call ThreadLocal only once
URL: https://github.com/apache/skywalking/pull/3068#discussion_r304444605
##########
File path:
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java
##########
@@ -165,12 +166,20 @@ public static AbstractSpan activeSpan() {
return get().activeSpan();
}
+ /**
+ * Plese use `ContextManager.stopSpan(span)` if could, it's can "fail-fast"
+ */
public static void stopSpan() {
- stopSpan(activeSpan());
+ final AbstractTracerContext context = get();
+ stopSpan(context.activeSpan(),context);
}
public static void stopSpan(AbstractSpan span) {
- if (get().stopSpan(span)) {
+ stopSpan(span,get());
+ }
+
+ private static void stopSpan(AbstractSpan span,final AbstractTracerContext
context) {
Review comment:
> @qxo Are you still working on this?
Sorry, still busy...
And I don't familiar with the review workflow, and what should I do next ?
----------------------------------------------------------------
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]
With regards,
Apache Git Services