-
Notifications
You must be signed in to change notification settings - Fork 289
profiles: make profile_id
optional
#665
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,9 +251,11 @@ message Profile { | |
int32 default_sample_type_index = 9; | ||
|
||
// A globally unique identifier for a profile. The ID is a 16-byte array. An ID with | ||
// all zeroes is considered invalid. | ||
// | ||
// This field is required. | ||
// all zeroes is considered invalid. It may be used for deduplication and signal | ||
// correlation purposes. It is acceptable to treat two profiles with different values | ||
// in this field as not equal, even if they represented the same object at an earlier | ||
// time. | ||
// This field is optional; an ID may be assigned to an ID-less profile in a later step. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What value is it set to if unset and optional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was some discussion in #652 about this, the idea is that if a profile does not have an ID it may receive one for deduplication purposes later, e.g. in the collector. The value would be a real valid identifier, including 16 zeros if that makes sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the proto file comment says 16 zeros is invalid. I cannot reconcile it with your statement above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, that's a bit unclear, let me rephrase.
The receiver of an id-less profile (i.e. I'm not sure whether the semantic difference between unset and 16 zeros is part of the spec though. I'm just guessing. |
||
bytes profile_id = 10; | ||
|
||
// dropped_attributes_count is the number of attributes that were discarded. Attributes | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the ID is a 16-byte array, and is unset, then all bytes are set to zero - is a profile ID unset therefore invalid per this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unset will look like "field not set" (e.g. for Python
message.HasField("profile_id") == false
) or an empty byte array depending on the Protobuf implementation. But in both cases, unset won't look like a 16-byte array of zeros.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea behind stating that
An ID with all zeroes is considered invalid
is just to provide a null value that the community can use in implementations when a well-formed value must be set for practical reasons.