-
Notifications
You must be signed in to change notification settings - Fork 302
Improves a visibility the case events routed to DLQ. #1253
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
ef59f21
2199b89
bad8c0c
c72668b
a330470
b306761
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -273,6 +273,7 @@ def submit(actions) | |
| end | ||
|
|
||
| actions_to_retry = [] | ||
| dlq_reouted_stats = {} | ||
| responses.each_with_index do |response,idx| | ||
| action_type, action_props = response.first | ||
|
|
||
|
|
@@ -296,6 +297,11 @@ def submit(actions) | |
| elsif @dlq_codes.include?(status) | ||
| handle_dlq_response("Could not index event to Elasticsearch.", action, status, response) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WDYT about DLQ'd events going to the debug log?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. kk good question! Yesterday it took me ~15min to decide to go with warning. Why?!- I consider this case need an ATTENTION. But I am open to change if you have strong point.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry if there is a misunderstanding - my comment was whether we should consider the reason for all events going to the DLQ at a |
||
| @document_level_metrics.increment(:dlq_routed) | ||
| if dlq_reouted_stats.key?(status) | ||
| dlq_reouted_stats[status][:count] += 1 | ||
| else | ||
| dlq_reouted_stats[status] = { :count => 1, :sample_event => { :action => action, :response => response } } | ||
| end | ||
| next | ||
| else | ||
| # only log what the user whitelisted | ||
|
|
@@ -305,6 +311,11 @@ def submit(actions) | |
| end | ||
| end | ||
|
|
||
| if @dlq_writer && !dlq_reouted_stats.empty? | ||
| total = dlq_reouted_stats.values.sum { |entry| entry[:count] } | ||
| @logger.warn("Events could not be indexed and routing to DLQ", :count => total, :dlq_reouted_stats => dlq_reouted_stats) | ||
| end | ||
|
|
||
| actions_to_retry | ||
| end | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.