WIP - proposals for mapping login/logout events into Santa telemetry #1370
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.
Sourcing some feedback. Two proposals outlined here.
Method 1: Breaking each event into its own type. Since each type is independent there is no ability to map in data to events that wouldn't otherwise support (e.g. logout events don't have failure messages). But this does lead to some duplication and/or extremely similar message types.
Method 2: Top level messages are shared with an enum specifying the specific action (e.g. login/logout attach/detach, etc.). This reduces the number of message types and is maybe easier to read but supports invalid mappings.
My preference is Method 1, it's a much cleaner approach, but looking for feedback. I'm also curious if anyone has more experience with how protos are more broadly defined and how well each of these methods align with the standard way of doing things.