Skip to content

Commit 8096b9f

Browse files
authored
Fix statsbeat warning (#2208)
1 parent 1713d53 commit 8096b9f

File tree

1 file changed

+8
-4
lines changed
  • agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/telemetry

1 file changed

+8
-4
lines changed

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/telemetry/BatchSpanProcessor.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,14 @@ private void exportCurrentBatch() {
277277
pendingExports.remove(result);
278278
});
279279
} else {
280-
addAsyncExport.recordFailure(
281-
"Max number of concurrent exports "
282-
+ maxPendingExports
283-
+ " has been hit, may see some export throttling due to this");
280+
// need conditional, otherwise this will always get logged when maxPendingExports is 1
281+
// (e.g. statsbeat)
282+
if (maxPendingExports > 1) {
283+
addAsyncExport.recordFailure(
284+
"Max number of concurrent exports "
285+
+ maxPendingExports
286+
+ " has been hit, may see some export throttling due to this");
287+
}
284288
result.join(exporterTimeoutNanos, TimeUnit.NANOSECONDS);
285289
}
286290
} finally {

0 commit comments

Comments
 (0)