You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 21, 2023. It is now read-only.
// Field JSON object (map[string]google.protobuf.Value)
google.protobuf.Structfields=6;
// Note: The google.protobuf.Value type should be extended (or re-implemented) with a
// google.protobuf.Timestamp to avoid the cost of encoding timestamps as strings and then
// parsing them back into a date representation.
Following from the note in the event definition, we should extend the google.protobuf.Struct type to allow using google.protobuf.Timestamp as one of the Value cases. The agent always writes to datastreams which require a timestamp, forcing timestamps to be encoded causes us to inefficiently parse them from string for every message received.
messageValue {
// The kind of value.oneofkind {
// Represents a null value.NullValuenull_value=1;
// Represents a double value.doublenumber_value=2;
// Represents a string value.stringstring_value=3;
// Represents a boolean value.boolbool_value=4;
// Represents a structured value.Structstruct_value=5;
// Represents a repeated `Value`.ListValuelist_value=6;
// Represents a timestamp.google.protobuf.Timestamptimestamp=7;
}
}
The shipper
Eventpayload are currently defined as google.protobuf.Struct which require encoding timestamps as strings:elastic-agent-shipper/api/shipper.proto
Lines 48 to 54 in 504c1e1
Following from the note in the event definition, we should extend the
google.protobuf.Structtype to allow using google.protobuf.Timestamp as one of theValuecases. The agent always writes to datastreams which require a timestamp, forcing timestamps to be encoded causes us to inefficiently parse them from string for every message received.It should be enough to clone the existing google.protobuf.Struct definition and add the new message case in the
Valueoneof type, for example: