Skip to content

Commit d7959b6

Browse files
fixes custom timestamp bug
Do not set telemetry timestamp if it already exists
1 parent 21d4b1f commit d7959b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/java/com/microsoft/applicationinsights/TelemetryClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ public void track(Telemetry telemetry) {
394394
return;
395395
}
396396

397-
telemetry.setTimestamp(new Date());
397+
if (telemetry.getTimestamp() == null) {
398+
telemetry.setTimestamp(new Date());
399+
}
398400

399401
TelemetryContext ctx = this.getContext();
400402

0 commit comments

Comments
 (0)