diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/ILSMIOOperation.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/ILSMIOOperation.java
index 79360d5..a13f82c 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/ILSMIOOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/ILSMIOOperation.java
@@ -21,6 +21,7 @@
 import java.util.concurrent.Callable;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.io.FileReference;
 import org.apache.hyracks.api.io.IODeviceHandle;
 
 public interface ILSMIOOperation extends Callable<Boolean> {
@@ -55,4 +56,11 @@
 
     @Override
     Boolean call() throws HyracksDataException;
+
+    /**
+     * The target of the io operation
+     *
+     * @return
+     */
+    FileReference getTarget();
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
index 09e236e..6e51f83 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractIoOperation.java
@@ -49,6 +49,7 @@
         return callback;
     }
 
+    @Override
     public FileReference getTarget() {
         return target;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/FlushOperation.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/FlushOperation.java
index 3d65a6f..1173aeb 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/FlushOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/FlushOperation.java
@@ -50,11 +50,6 @@
     }
 
     @Override
-    public FileReference getTarget() {
-        return target;
-    }
-
-    @Override
     public ILSMIndexAccessor getAccessor() {
         return accessor;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
index b4b846d..d801a44 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/TracedIOOperation.java
@@ -22,10 +22,12 @@
 import java.util.logging.Logger;
 
 import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.io.FileReference;
 import org.apache.hyracks.api.io.IODeviceHandle;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMIOOperation;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMIOOperationCallback;
 import org.apache.hyracks.util.trace.Tracer;
+import org.apache.hyracks.util.trace.Tracer.Scope;
 
 class TracedIOOperation implements ILSMIOOperation {
 
@@ -45,6 +47,9 @@
 
     public static ILSMIOOperation wrap(final ILSMIOOperation ioOp, final Tracer tracer) {
         if (tracer != null && tracer.isEnabled()) {
+            tracer.instant(ioOp.getTarget().getRelativePath(),
+                    ioOp.getIOOpertionType() == LSMIOOpertionType.FLUSH ? "schedule-flush" : "schedule-merge", Scope.p,
+                    null);
             return ioOp instanceof Comparable ? new ComparableTracedIOOperation(ioOp, tracer)
                     : new TracedIOOperation(ioOp, tracer);
         }
@@ -55,31 +60,40 @@
         return ioOp;
     }
 
+    @Override
     public IODeviceHandle getDevice() {
         return ioOp.getDevice();
     }
 
+    @Override
     public ILSMIOOperationCallback getCallback() {
         return ioOp.getCallback();
     }
 
+    @Override
     public String getIndexIdentifier() {
         return ioOp.getIndexIdentifier();
     }
 
+    @Override
     public LSMIOOpertionType getIOOpertionType() {
         return ioOpType;
     }
 
     @Override
     public Boolean call() throws HyracksDataException {
-        final long tid = tracer.durationB(getDevice().toString(), cat, null);
+        final long tid = tracer.durationB(getTarget().getRelativePath(), cat, null);
         try {
             return ioOp.call();
         } finally {
             tracer.durationE(tid, "{\"optional\":\"value\"}");
         }
     }
+
+    @Override
+    public FileReference getTarget() {
+        return ioOp.getTarget();
+    }
 }
 
 class ComparableTracedIOOperation extends TracedIOOperation implements Comparable<ILSMIOOperation> {
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Event.java b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Event.java
new file mode 100644
index 0000000..4a46c19
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Event.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.hyracks.util.trace;
+
+import org.apache.hyracks.util.trace.Tracer.Scope;
+
+final class Event {
+    public final String name;
+    public final String cat;
+    public final Tracer.Phase ph;
+    public final long ts;
+    public final int pid;
+    public final long tid;
+    public final Tracer.Scope scope;
+    public final String args;
+
+    private Event(String name, String cat, Tracer.Phase ph, long ts, int pid, long tid, Tracer.Scope scope,
+            String args) {
+        this.name = name;
+        this.cat = cat;
+        this.ph = ph;
+        this.ts = ts;
+        this.pid = pid;
+        this.tid = tid;
+        this.scope = scope;
+        this.args = args;
+    }
+
+    private static long timestamp() {
+        return System.nanoTime() / 1000;
+    }
+
+    public static Event create(String name, String cat, Tracer.Phase ph, int pid, long tid, Scope scope, String args) {
+        return new Event(name, cat, ph, timestamp(), pid, tid, scope, args);
+    }
+
+    public String toJson() {
+        return append(new StringBuilder()).toString();
+    }
+
+    public StringBuilder append(StringBuilder sb) {
+        sb.append("{");
+        if (name != null) {
+            sb.append("\"name\":\"").append(name).append("\",");
+        }
+        if (cat != null) {
+            sb.append("\"cat\":\"").append(cat).append("\",");
+        }
+        sb.append("\"ph\":\"").append(ph).append("\",");
+        sb.append("\"pid\":\"").append(pid).append("\",");
+        sb.append("\"tid\":").append(tid).append(",");
+        sb.append("\"ts\":").append(ts);
+        if (scope != null) {
+            sb.append(",\"s\":\"").append(scope).append("\"");
+        }
+        if (args != null) {
+            sb.append(",\"args\":").append(args);
+        }
+        sb.append("}");
+        return sb;
+    }
+}
\ No newline at end of file
diff --git a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
index 1c02ac8..4dc2394 100644
--- a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
+++ b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/trace/Tracer.java
@@ -44,7 +44,7 @@
         // Complete Events
         X,
         // Instant Events
-        I,
+        i,
         // Counter Events
         C,
         // Async Events
@@ -61,6 +61,12 @@
         D // destroyed
     }
 
+    public enum Scope {
+        g, // Global scope
+        p, // Process scope
+        t // Thread scope
+    }
+
     public Tracer(String name, String[] categories) {
         this.traceLog = Logger.getLogger(Tracer.class.getName() + "@" + name);
         this.categories = categories;
@@ -88,64 +94,18 @@
     }
 
     public long durationB(String name, String cat, String args) {
-        Event e = Event.create(name, cat, Phase.B, pid, Thread.currentThread().getId(), args);
+        Event e = Event.create(name, cat, Phase.B, pid, Thread.currentThread().getId(), null, args);
         traceLog.log(TRACE_LOG_LEVEL, e.toJson());
         return e.tid;
     }
 
     public void durationE(long tid, String args) {
-        Event e = Event.create(null, null, Phase.E, pid, tid, args);
+        Event e = Event.create(null, null, Phase.E, pid, tid, null, args);
         traceLog.log(TRACE_LOG_LEVEL, e.toJson());
     }
-}
 
-class Event {
-    public final String name;
-    public final String cat;
-    public final Tracer.Phase ph;
-    public final long ts;
-    public final int pid;
-    public final long tid;
-    public final String args;
-
-    private Event(String name, String cat, Tracer.Phase ph, long ts, int pid, long tid, String args) {
-        this.name = name;
-        this.cat = cat;
-        this.ph = ph;
-        this.ts = ts;
-        this.pid = pid;
-        this.tid = tid;
-        this.args = args;
-    }
-
-    private static long timestamp() {
-        return System.nanoTime() / 1000;
-    }
-
-    public static Event create(String name, String cat, Tracer.Phase ph, int pid, long tid, String args) {
-        return new Event(name, cat, ph, timestamp(), pid, tid, args);
-    }
-
-    public String toJson() {
-        return append(new StringBuilder()).toString();
-    }
-
-    public StringBuilder append(StringBuilder sb) {
-        sb.append("{");
-        if (name != null) {
-            sb.append("\"name\":\"").append(name).append("\",");
-        }
-        if (cat != null) {
-            sb.append("\"cat\":\"").append(cat).append("\",");
-        }
-        sb.append("\"ph\":\"").append(ph).append("\",");
-        sb.append("\"pid\":\"").append(pid).append("\",");
-        sb.append("\"tid\":").append(tid).append(",");
-        sb.append("\"ts\":").append(ts);
-        if (args != null) {
-            sb.append(",\"args\":").append(args);
-        }
-        sb.append("}");
-        return sb;
+    public void instant(String name, String cat, Scope scope, String args) {
+        Event e = Event.create(name, cat, Phase.i, pid, Thread.currentThread().getId(), scope, args);
+        traceLog.log(TRACE_LOG_LEVEL, e.toJson());
     }
 }
