yuanlihan opened a new pull request #12337: URL: https://github.com/apache/druid/pull/12337
### Description This is a simple PR to fix the `ingest/events/messageGap` metric. If there's a task to ingest a listless trickle of events from an upstream Kafka topic, the metrics monitor may take snapshot before starting processing events. In this case, the `messageMaxTimestamp` is unset and the `messageGap` should be the initial value (0L). Below panel shows the invalid metric data points <img width="1299" alt="Screenshot 2022-03-16 at 12 16 05" src="https://user-images.githubusercontent.com/44718283/158515789-b5823bbc-c76c-4bb9-8bd9-55941844d059.png"> <hr> <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items from the checklist below are strictly necessary, but it would be very helpful if you at least self-review the PR. --> This PR has: - [X] been self-reviewed. - [X] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
