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.
While working on #2548 I needed to understand when some events are firing and learned that we do not have any documentation around events. Ideally, we'd have a document that outlines the common event sequences, but I don't have that picture right now. What this PR includes is jsdoc for almost every event the codebase generates. There is a whole class events in the
Config
namespace that I could not document. These events are emitting events named after configuration keys. There are two problems here:enabled
from{ feature_name: { enabled: true } }
is changed tofalse
? Would the event name beenabled
,feature_name
, or something likefeature_name.enabled
?Also, this PR changes the events around data sending. The current event names are like
starting error_data data send.
. This PR changes them tostarting_data_send-error_data
. We can't document event names with spaces, and other non-alphanum characters, in them. Indeed, it was a bit of a challenge to find a separator character to separate the prefix and actual event name that jsdoc would handle correctly.So, while not everything is fully documented, I think the PR puts us in a better position than before.