Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR vs WARN for registry/publisher errors #1108

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public void stop() {
overridableClock.setWallTime(now / stepMillis * stepMillis + stepMillis);
sendToAtlas();
} catch (Exception e) {
logger.warn("failed to flush data to Atlas", e);
logger.error("failed to flush data to Atlas", e);
}

// Shutdown publisher used for sending metrics
Expand Down Expand Up @@ -317,7 +317,7 @@ void sendToLWC() {
CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join();
}
} catch (Exception e) {
logger.warn("failed to send metrics for subscriptions (uri={})", evalUri, e);
logger.error("failed to send metrics for subscriptions (uri={})", evalUri, e);
}
} else {
logger.debug("lwc is disabled, skipping subscriptions");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public CompletableFuture<Void> publish(PublishPayload payload) {
recordClockSkew((date == null) ? 0L : date.toEpochMilli());
validationHelper.recordResults(payload.getMetrics().size(), res);
} catch (Exception e) {
logger.warn("failed to send metrics (uri={})", uri, e);
logger.error("failed to send metrics (uri={})", uri, e);
validationHelper.incrementDroppedHttp(payload.getMetrics().size());
}
};
Expand All @@ -191,7 +191,7 @@ public CompletableFuture<Void> publish(EvalPayload payload) {
.withJsonContent(json)
.send();
} catch (Exception e) {
logger.warn("failed to send metrics for subscriptions (uri={})", evalUri, e);
logger.error("failed to send metrics for subscriptions (uri={})", evalUri, e);
}
};
return CompletableFuture.runAsync(task, senderPool);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ private void collectData() {
.compress(Deflater.BEST_SPEED)
.send();
if (res.status() != 200) {
logger.warn("failed to send metrics, status {}: {}", res.status(), res.entityAsString());
logger.error("failed to send metrics, status {}: {}", res.status(), res.entityAsString());
}
}
removeExpiredMeters();
} catch (Exception e) {
logger.warn("failed to send metrics", e);
logger.error("failed to send metrics", e);
}
}

Expand Down
Loading