Don't log Log Records if they are sampled out (#3936)
This commit is contained in:
Родитель
a2c517b5b1
Коммит
88b28f6767
|
@ -96,7 +96,6 @@ public class AgentLogExporter implements LogRecordExporter {
|
|||
return CompletableResultCode.ofFailure();
|
||||
}
|
||||
for (LogRecordData log : logs) {
|
||||
logger.debug("exporting log: {}", log);
|
||||
try {
|
||||
int severityNumber = log.getSeverity().getSeverityNumber();
|
||||
if (severityNumber < severityThreshold) {
|
||||
|
@ -124,6 +123,8 @@ public class AgentLogExporter implements LogRecordExporter {
|
|||
continue;
|
||||
}
|
||||
|
||||
logger.debug("exporting log: {}", log);
|
||||
|
||||
TelemetryItem telemetryItem = mapper.map(log, stack, samplingPercentage);
|
||||
telemetryItemConsumer.accept(telemetryItem);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче