wu-sheng commented on a change in pull request #4220: sniffer processing 
profile task and report status and snapshot
URL: https://github.com/apache/skywalking/pull/4220#discussion_r366853949
 
 

 ##########
 File path: 
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/TracingContext.java
 ##########
 @@ -92,15 +93,27 @@
 
     private volatile boolean running;
 
+    private final long createTime;
+
+    /**
+     * profiling status
+     */
+    private final boolean profiling;
+
     /**
      * Initialize all fields with default value.
      */
-    TracingContext() {
+    TracingContext(String firstOPName) {
         this.segment = new TraceSegment();
         this.spanIdGenerator = 0;
         samplingService = 
ServiceManager.INSTANCE.findService(SamplingService.class);
         isRunningInAsyncMode = false;
+        createTime = System.currentTimeMillis();
         running = true;
+
+        // profiling status
+        final ProfileTaskExecutionService profileTaskExecutionService = 
ServiceManager.INSTANCE.findService(ProfileTaskExecutionService.class);
 
 Review comment:
   You don't need to `findService` every time. Please add a field to hold the 
ref.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to