You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/src/main/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionFileSystemOutput.java
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ public final class TransmissionFileSystemOutput implements TransmissionOutput {
87
87
privateFilefolder;
88
88
89
89
/// Capacity is the size of disk that we are can use
@@ -134,8 +134,13 @@ public TransmissionFileSystemOutput(String folderPath) {
134
134
135
135
@Override
136
136
publicbooleansend(Transmissiontransmission) {
137
-
if (size.get() >= capacityInKB) {
138
-
InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.WARN, "Persistent storage max capacity has been reached; currently at %s KB. Telemetry will be lost, please set the MaxTransmissionStorageFilesCapacityInMB property in the configuration file.", size.get());
137
+
138
+
longcurrentSizeInBytes = size.get();
139
+
if (currentSizeInBytes >= capacityInBytes) {
140
+
InternalLogger.INSTANCE.logAlways(InternalLogger.LoggingLevel.WARN, "Persistent storage max capacity has been reached; "
141
+
+ "currently at %.3f KB. Telemetry will be lost, "
142
+
+ "please consider increasing the value of MaxTransmissionStorageFilesCapacityInMB property in the configuration file.",
143
+
(currentSizeInBytes / 1024.0));
139
144
returnfalse;
140
145
}
141
146
@@ -204,7 +209,7 @@ public Transmission fetchOldestFile() {
Copy file name to clipboardExpand all lines: core/src/test/java/com/microsoft/applicationinsights/internal/channel/common/TransmissionFileSystemOutputTest.java
0 commit comments