Skip to content
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

WIP - proposals for mapping login/logout events into Santa telemetry #1370

Closed
wants to merge 1 commit into from

Conversation

mlw
Copy link
Member

@mlw mlw commented Jun 18, 2024

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.

@pmarkowsky
Copy link
Contributor

My vote is for Method 1 it's more friendly as it's adding a new field and any old parsers based on the old proto without that field will just ignore it.

The ergonomics on using the method 1 types feel more tailored to what you want to do.

Copy link
Collaborator

@russellhancox russellhancox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I much prefer Method 1.

Source/common/santa.proto Show resolved Hide resolved
optional uint32 id = 1;
}

message Address {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps SocketAddress?

@mlw
Copy link
Member Author

mlw commented Jun 20, 2024

superseded by #1371

@mlw mlw closed this Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants