Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[PAN-2354] Handle metrics request closing before response is generated #1028

Merged
merged 7 commits into from
Mar 4, 2019

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented Mar 3, 2019

PR description

Log the reason a metric request failed and check if the result has been closed before writing to it to avoid printing spurious errors to the console.

@@ -205,7 +205,10 @@ private void metricsRequest(final RoutingContext routingContext) {
false,
(res) -> {
if (res.failed()) {
LOG.debug("Request for metrics failed", res.cause());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a warn or error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally I wouldn't make it an error since the error is reported back out to the user already but actually in this case there's no user input to the request so any failures are almost certainly caused by our code being broken. I've increased it to error.

@ajsutton ajsutton merged commit 73f1f29 into PegaSysEng:master Mar 4, 2019
@ajsutton ajsutton deleted the metrics-error branch March 4, 2019 22:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants