Skip to content

Commit 761df19

Browse files
committed
refactor: remove logs
1 parent db2eead commit 761df19

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

packages/react-native-tracing/android/src/main/java/com/grafana/nativeinstrumentation/NativeInstrumentationModule.java

-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
@ReactModule(name = NativeInstrumentationModule.NAME)
2020
public class NativeInstrumentationModule extends ReactContextBaseJavaModule implements RCTEventEmitter {
21-
public static final String NAME = "NativeInstrumentation";
2221
private static boolean hasAppRestarted = false;
2322
private static int bundleLoadCounter = 0;
2423

@@ -31,14 +30,12 @@ public class NativeInstrumentationModule extends ReactContextBaseJavaModule impl
3130
}
3231
bundleLoadCounter++;
3332
}
34-
Log.d(NAME, String.format("JS bundle downloaded, hasAppRestarted: %b", hasAppRestarted));
3533
}
3634
});
3735
}
3836

3937
public NativeInstrumentationModule(ReactApplicationContext reactContext) {
4038
super(reactContext);
41-
Log.d(NAME, "Module constructor called");
4239
}
4340

4441
@Override
@@ -65,7 +62,6 @@ public double getStartupTimeSync() throws Exception {
6562

6663
@ReactMethod
6764
public void getStartupTime(Promise promise) {
68-
Log.d(NAME, "Getting startup time...");
6965
try {
7066
WritableMap response = Arguments.createMap();
7167

packages/react-native-tracing/ios/NativeInstrumentation.swift

-9
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,15 @@ public class NativeInstrumentation: NSObject, RCTBridgeModule {
2626
}
2727

2828
@objc private func handleBundleLoadStart(_ notification: Notification) {
29-
print("[NativeInstrumentation] Bundle load started")
30-
3129
if NativeInstrumentation.hasAppRestarted {
32-
print("[NativeInstrumentation] Skipping bundle load start as app has been restarted")
3330
return
3431
}
3532

36-
print("[NativeInstrumentation] App has been restarted");
3733
NativeInstrumentation.hasAppRestarted = true
3834
}
3935

4036
@objc
4137
public func getStartupTime(_ resolve: @escaping RCTPromiseResolveBlock, rejecter reject: @escaping RCTPromiseRejectBlock) {
42-
print("[NativeInstrumentation] Getting startup time...")
43-
4438
var mib = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()]
4539
var size = MemoryLayout<kinfo_proc>.size
4640
var kp = kinfo_proc()
@@ -60,14 +54,11 @@ public class NativeInstrumentation: NSObject, RCTBridgeModule {
6054
if result == 0 {
6155
let startTime = kp.kp_proc.p_un.__p_starttime
6256
startTimeMs = Int64(startTime.tv_sec) * 1000 + Int64(startTime.tv_usec) / 1000
63-
print("[NativeInstrumentation] Successfully got process start time: \(startTimeMs)ms")
6457
} else {
6558
startTimeMs = Int64(Date().timeIntervalSince1970 * 1000)
66-
print("[NativeInstrumentation] Warning: Failed to get process start time, falling back to current time: \(startTimeMs)ms")
6759
}
6860

6961
let response = ["startupTime": startTimeMs]
70-
print("[NativeInstrumentation] Resolving with response: \(response)")
7162
resolve(response)
7263
}
7364

0 commit comments

Comments
 (0)