-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Diagnostic API and service for Inputs #20958
base: master
Are you sure you want to change the base?
Conversation
if (errors != null && !errors.isEmpty()) { | ||
LOG.error("An error occurred while executing aggregation: {}", | ||
errors.stream().map(SearchError::description).collect(Collectors.joining(", "))); | ||
return EMPTY_DIAGNOSTICS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be better to pass the error message to the UI here, otherwise it would be a bit confusing for the user
private static AbstractMap.SimpleEntry<String, Long> extractValues(PivotResult.Row r) { | ||
if (r.values().size() != 1) { | ||
LOG.warn("Expected 1 value in aggregation result, but received [{}].", r.values().size()); | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, too, it might make more sense to throw an exception instead of displaying incomplete data.
final String streamId = r.key().get(0); | ||
if (StringUtils.isEmpty(streamId)) { | ||
LOG.warn("Expected a stream ID to be returned."); | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
/nocl new feature
Relates to issue #20683
A new API and service to provide data for the Input Setup Wizard.
The new endpoint:
GET system/inputs/diagnostics/{inputId}
Returns a JSON data structure, currently only with a single object representing the message count by stream. We may add to this in future. E.g.:
In case of no data we return an empty map: