Tracking logs: Treat null context same as missing context #25006
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.
Should resolve the AttributeError on the line:
that occurs when
full_segment_event['context'] == None.This error is currently the #1 in LMS and is obscuring other errors.
I think this was the cause of the alert this morning; my NewRelic-fu isn't developed enough to be sure though.
I don't know whether this is the right fix. Maybe it's good to have that AttributeError yelling at us until we can find out why we are getting segment events with
Noneas their context. I'm posting in hope of soliciting feedback.What do you think @stvstnfrd ?Update: This can't be the cause of the alert this morning, because it's owned by
platform-data-de, and we still see the error spike even when filtering that DE's endpoints out of the query.