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

If logWarningForTaskAfterMillis is set, all data retrieval durations are logged as warnings #381

Closed
ryangardner opened this issue Aug 23, 2018 · 2 comments
Labels
bug fix in progress v2.x Issues related to the 2.x version
Milestone

Comments

@ryangardner
Copy link

There is a configuration option to tell the KCL to log if a task takes longer than a certain number of milliseconds.

This presence of this same configuration option is used to enable some logging about how long it has been since data was received.

If you look at:

private void logNoDataRetrievedAfterTime() {
logWarningForTaskAfterMillis.ifPresent(value -> {
Instant lastDataArrival = subscriber.lastDataArrival;
if (lastDataArrival != null) {
Instant now = Instant.now();
Duration timeSince = Duration.between(subscriber.lastDataArrival, now);
log.warn("Last time data arrived: {} ({})", lastDataArrival, timeSince);
}
});
}

The setting value is not used to determine if a message should be logged - it logs a warning _every_time data is received - even if the duration was only a fraction of a second.

It seems like there should be a threshold before logging the warning. That threshold seems like a separate concern form the long running task setting.

@pfifer pfifer added bug v2.x Issues related to the 2.x version labels Aug 23, 2018
@pfifer
Copy link
Contributor

pfifer commented Aug 23, 2018

That message should respect the configuration. We'll look into fixing the issue.

@sahilpalvia
Copy link
Contributor

This issue has been fixed with the KCL release 2.0.2. Closing the issue, feel free to reopen the issue if problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix in progress v2.x Issues related to the 2.x version
Projects
None yet
Development

No branches or pull requests

3 participants