log firehose event via server after failing to log via client #28634
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
Data loss issues seem to affect certain classrooms, and we suspect this may have to do with their network configurations. We try to log many firehose event types to help diagnose these issues, however some classrooms with data loss problems do not show any of these events in the logs. One complicating factor is that some classrooms might not allow log messages to the firehose servers, which hit amazon urls directly via ajax requests. To work around this, the idea is to detect failed log attempts from the client, and to ask our server (which must already be allowed on the classroom's network) to log to firehose for us.
Description
Whenever a firehose event is logged on the client, if the log attempt fails and no callback was specified, use our own callback to ask our servers to log a firehose event. the server request includes all the original details from the failed client request.
Sample output
sample server log event after failing to save channel for standalone project: