diff --git a/proto/logsstateful/stateful_encoding.proto b/proto/logsstateful/stateful_encoding.proto index dc5743b4..a50206a3 100644 --- a/proto/logsstateful/stateful_encoding.proto +++ b/proto/logsstateful/stateful_encoding.proto @@ -69,14 +69,28 @@ message StructuredLog { repeated DynamicValue dynamic_values = 2; // JSON structured log fields. Example: - // Input log: {"msg":"Evicted 1 tags","agent":"core","time":"2026-03-31","level":"INFO"} - // Converts to: - // json_context {"agent":"core","level":"INFO","time":"2026-03-31"} + // Input log: {"msg":"Evicted user tags","agent":"core","time":"2026-03-31","level":"INFO"} + // With schema-based encoding, converts to: + // json_context_schema 44 (points to "agent,level,time" in dictionary) + // json_context_values ["core", "INFO", "2026-03-31"] // json_message_key "msg" // pattern_id 123 (points to "Evicted {} tags") - // dynamic_values [1] - bytes json_context = 3; + // dynamic_values ["user"] + + // The key of the json object to put the message back into (e.g. "msg", "message", "log") DynamicValue json_message_key = 4; + + // Schema-based JSON context encoding: separates repeating key structure from per-log values. + // json_context_schema_id references a DictEntryDefine whose value is a comma-separated sorted + // list of JSON keys (e.g. "level,service,timestamp"). Delta-encoded across batches. + uint64 json_context_schema_id = 5; + // json_context_values contains the leaf values in the same order as the schema keys. + // Each value is encoded as a DynamicValue (int64 for numbers, dict_index for repeated strings). + // Nested objects/arrays are serialized as JSON strings. + repeated DynamicValue json_context_values = 6; + + // Deprecated: Use json_context_schema_id and json_context_values instead. + bytes json_context = 3; } message DynamicValue { diff --git a/statefulpb/stateful_encoding.pb.go b/statefulpb/stateful_encoding.pb.go index 281a0c8d..8411940e 100644 --- a/statefulpb/stateful_encoding.pb.go +++ b/statefulpb/stateful_encoding.pb.go @@ -510,16 +510,18 @@ type StructuredLog struct { PatternId uint64 `protobuf:"varint,1,opt,name=pattern_id,json=patternId,proto3" json:"pattern_id,omitempty"` DynamicValues []*DynamicValue `protobuf:"bytes,2,rep,name=dynamic_values,json=dynamicValues,proto3" json:"dynamic_values,omitempty"` - // JSON structured log fields. Example: - // Input log: {"msg":"Evicted 1 tags","agent":"core","time":"2026-03-31","level":"INFO"} - // Converts to: - // - // json_context {"agent":"core","level":"INFO","time":"2026-03-31"} - // json_message_key "msg" - // pattern_id 123 (points to "Evicted {} tags") - // dynamic_values [1] - JsonContext []byte `protobuf:"bytes,3,opt,name=json_context,json=jsonContext,proto3" json:"json_context,omitempty"` + // The key of the json object to put the message back into (e.g. "msg", "message", "log") JsonMessageKey *DynamicValue `protobuf:"bytes,4,opt,name=json_message_key,json=jsonMessageKey,proto3" json:"json_message_key,omitempty"` + // Schema-based JSON context encoding: separates repeating key structure from per-log values. + // json_context_schema_id references a DictEntryDefine whose value is a comma-separated sorted + // list of JSON keys (e.g. "level,service,timestamp"). Delta-encoded across batches. + JsonContextSchemaId uint64 `protobuf:"varint,5,opt,name=json_context_schema_id,json=jsonContextSchemaId,proto3" json:"json_context_schema_id,omitempty"` + // json_context_values contains the leaf values in the same order as the schema keys. + // Each value is encoded as a DynamicValue (int64 for numbers, dict_index for repeated strings). + // Nested objects/arrays are serialized as JSON strings. + JsonContextValues []*DynamicValue `protobuf:"bytes,6,rep,name=json_context_values,json=jsonContextValues,proto3" json:"json_context_values,omitempty"` + // Deprecated: Use json_context_schema_id and json_context_values instead. + JsonContext []byte `protobuf:"bytes,3,opt,name=json_context,json=jsonContext,proto3" json:"json_context,omitempty"` } func (x *StructuredLog) Reset() { @@ -568,16 +570,30 @@ func (x *StructuredLog) GetDynamicValues() []*DynamicValue { return nil } -func (x *StructuredLog) GetJsonContext() []byte { +func (x *StructuredLog) GetJsonMessageKey() *DynamicValue { if x != nil { - return x.JsonContext + return x.JsonMessageKey } return nil } -func (x *StructuredLog) GetJsonMessageKey() *DynamicValue { +func (x *StructuredLog) GetJsonContextSchemaId() uint64 { if x != nil { - return x.JsonMessageKey + return x.JsonContextSchemaId + } + return 0 +} + +func (x *StructuredLog) GetJsonContextValues() []*DynamicValue { + if x != nil { + return x.JsonContextValues + } + return nil +} + +func (x *StructuredLog) GetJsonContext() []byte { + if x != nil { + return x.JsonContext } return nil } @@ -1110,7 +1126,7 @@ var file_proto_logsstateful_stateful_encoding_proto_rawDesc = []byte{ 0x53, 0x65, 0x74, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x88, 0x01, 0x01, 0x42, 0x09, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x22, 0xf0, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x75, 0x63, + 0x05, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x22, 0xfc, 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x4c, 0x6f, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0e, 0x64, 0x79, 0x6e, 0x61, 0x6d, @@ -1118,92 +1134,101 @@ var file_proto_logsstateful_stateful_encoding_proto_rawDesc = []byte{ 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6a, 0x73, 0x6f, - 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x4f, 0x0a, 0x10, 0x6a, 0x73, 0x6f, 0x6e, - 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, - 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x44, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6a, 0x73, 0x6f, 0x6e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x22, 0x9f, 0x01, 0x0a, 0x0c, 0x44, 0x79, - 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, - 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, - 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, - 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x64, 0x69, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x09, 0x64, 0x69, 0x63, 0x74, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x11, - 0x44, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, - 0x63, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x49, 0x64, 0x12, 0x33, - 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x54, 0x61, 0x67, 0x53, 0x65, 0x74, 0x52, 0x04, 0x74, - 0x61, 0x67, 0x73, 0x22, 0xf3, 0x03, 0x0a, 0x05, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x12, 0x4f, 0x0a, - 0x0e, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, - 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, - 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, - 0x0d, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x12, 0x4f, - 0x0a, 0x0e, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, + 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6a, 0x73, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x33, 0x0a, 0x16, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6a, 0x73, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x12, 0x55, 0x0a, 0x13, 0x6a, + 0x73, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, + 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, + 0x75, 0x6c, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x11, 0x6a, 0x73, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x9f, 0x01, 0x0a, 0x0c, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, + 0x63, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, + 0x0a, 0x64, 0x69, 0x63, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x48, 0x00, 0x52, 0x09, 0x64, 0x69, 0x63, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x07, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x74, + 0x61, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x70, + 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, + 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, + 0x75, 0x6c, 0x2e, 0x54, 0x61, 0x67, 0x53, 0x65, 0x74, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, + 0xf3, 0x03, 0x0a, 0x05, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, + 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x50, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, + 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x50, 0x61, 0x74, + 0x74, 0x65, 0x72, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x70, 0x61, + 0x74, 0x74, 0x65, 0x72, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x64, + 0x69, 0x63, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, - 0x2e, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, - 0x52, 0x0d, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x56, 0x0a, 0x11, 0x64, 0x69, 0x63, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x44, 0x69, 0x63, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x69, 0x63, 0x74, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x64, 0x69, 0x63, 0x74, 0x5f, - 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, - 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x44, 0x69, 0x63, - 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, - 0x64, 0x69, 0x63, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, - 0x5c, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, - 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x74, - 0x61, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x32, 0x0a, - 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x61, - 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x4c, 0x6f, 0x67, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x6f, 0x67, - 0x73, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x0d, 0x44, 0x61, 0x74, - 0x75, 0x6d, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, + 0x2e, 0x44, 0x69, 0x63, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, + 0x48, 0x00, 0x52, 0x0f, 0x64, 0x69, 0x63, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x44, 0x65, 0x66, + 0x69, 0x6e, 0x65, 0x12, 0x56, 0x0a, 0x11, 0x64, 0x69, 0x63, 0x74, 0x5f, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x44, 0x69, 0x63, 0x74, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x69, 0x63, 0x74, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x5c, 0x0a, 0x13, 0x64, + 0x65, 0x6c, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x79, + 0x6e, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, - 0x75, 0x6c, 0x2e, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3e, - 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, - 0x19, 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x8c, - 0x01, 0x0a, 0x0b, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, - 0x0a, 0x08, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x07, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, - 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1d, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, - 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x32, 0x75, 0x0a, - 0x13, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x12, 0x26, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, - 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x66, 0x75, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, - 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x28, 0x01, 0x30, 0x01, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x67, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, - 0x6c, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x53, 0x79, 0x6e, 0x63, 0x48, 0x00, 0x52, 0x11, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x32, 0x0a, 0x04, 0x6c, 0x6f, 0x67, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, + 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, + 0x6c, 0x2e, 0x4c, 0x6f, 0x67, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x42, 0x06, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x43, 0x0a, 0x0d, 0x44, 0x61, 0x74, 0x75, 0x6d, 0x53, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, + 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x44, + 0x61, 0x74, 0x75, 0x6d, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3e, 0x0a, 0x0d, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x8c, 0x01, 0x0a, 0x0b, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, + 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x1d, 0x0a, 0x06, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x32, 0x75, 0x0a, 0x13, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x66, 0x75, 0x6c, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x5e, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x26, + 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, + 0x6c, 0x42, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x24, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x64, 0x6f, 0x67, + 0x2e, 0x69, 0x6e, 0x74, 0x61, 0x6b, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, + 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x28, 0x01, 0x30, 0x01, + 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, + 0x61, 0x74, 0x61, 0x44, 0x6f, 0x67, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1245,22 +1270,23 @@ var file_proto_logsstateful_stateful_encoding_proto_depIdxs = []int32{ 5, // 4: datadog.intake.stateful.Log.tags:type_name -> datadog.intake.stateful.TagSet 9, // 5: datadog.intake.stateful.StructuredLog.dynamic_values:type_name -> datadog.intake.stateful.DynamicValue 9, // 6: datadog.intake.stateful.StructuredLog.json_message_key:type_name -> datadog.intake.stateful.DynamicValue - 5, // 7: datadog.intake.stateful.DeltaEncodingSync.tags:type_name -> datadog.intake.stateful.TagSet - 3, // 8: datadog.intake.stateful.Datum.pattern_define:type_name -> datadog.intake.stateful.PatternDefine - 4, // 9: datadog.intake.stateful.Datum.pattern_delete:type_name -> datadog.intake.stateful.PatternDelete - 1, // 10: datadog.intake.stateful.Datum.dict_entry_define:type_name -> datadog.intake.stateful.DictEntryDefine - 2, // 11: datadog.intake.stateful.Datum.dict_entry_delete:type_name -> datadog.intake.stateful.DictEntryDelete - 10, // 12: datadog.intake.stateful.Datum.delta_encoding_sync:type_name -> datadog.intake.stateful.DeltaEncodingSync - 7, // 13: datadog.intake.stateful.Datum.logs:type_name -> datadog.intake.stateful.Log - 11, // 14: datadog.intake.stateful.DatumSequence.data:type_name -> datadog.intake.stateful.Datum - 0, // 15: datadog.intake.stateful.BatchStatus.status:type_name -> datadog.intake.stateful.BatchStatus.Status - 13, // 16: datadog.intake.stateful.StatefulLogsService.LogsStream:input_type -> datadog.intake.stateful.StatefulBatch - 14, // 17: datadog.intake.stateful.StatefulLogsService.LogsStream:output_type -> datadog.intake.stateful.BatchStatus - 17, // [17:18] is the sub-list for method output_type - 16, // [16:17] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 9, // 7: datadog.intake.stateful.StructuredLog.json_context_values:type_name -> datadog.intake.stateful.DynamicValue + 5, // 8: datadog.intake.stateful.DeltaEncodingSync.tags:type_name -> datadog.intake.stateful.TagSet + 3, // 9: datadog.intake.stateful.Datum.pattern_define:type_name -> datadog.intake.stateful.PatternDefine + 4, // 10: datadog.intake.stateful.Datum.pattern_delete:type_name -> datadog.intake.stateful.PatternDelete + 1, // 11: datadog.intake.stateful.Datum.dict_entry_define:type_name -> datadog.intake.stateful.DictEntryDefine + 2, // 12: datadog.intake.stateful.Datum.dict_entry_delete:type_name -> datadog.intake.stateful.DictEntryDelete + 10, // 13: datadog.intake.stateful.Datum.delta_encoding_sync:type_name -> datadog.intake.stateful.DeltaEncodingSync + 7, // 14: datadog.intake.stateful.Datum.logs:type_name -> datadog.intake.stateful.Log + 11, // 15: datadog.intake.stateful.DatumSequence.data:type_name -> datadog.intake.stateful.Datum + 0, // 16: datadog.intake.stateful.BatchStatus.status:type_name -> datadog.intake.stateful.BatchStatus.Status + 13, // 17: datadog.intake.stateful.StatefulLogsService.LogsStream:input_type -> datadog.intake.stateful.StatefulBatch + 14, // 18: datadog.intake.stateful.StatefulLogsService.LogsStream:output_type -> datadog.intake.stateful.BatchStatus + 18, // [18:19] is the sub-list for method output_type + 17, // [17:18] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_proto_logsstateful_stateful_encoding_proto_init() } diff --git a/statefulpb/stateful_encoding_vtproto.pb.go b/statefulpb/stateful_encoding_vtproto.pb.go index 7e64b2e9..8ffef68a 100644 --- a/statefulpb/stateful_encoding_vtproto.pb.go +++ b/statefulpb/stateful_encoding_vtproto.pb.go @@ -434,6 +434,23 @@ func (m *StructuredLog) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= len(m.unknownFields) copy(dAtA[i:], m.unknownFields) } + if len(m.JsonContextValues) > 0 { + for iNdEx := len(m.JsonContextValues) - 1; iNdEx >= 0; iNdEx-- { + size, err := m.JsonContextValues[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x32 + } + } + if m.JsonContextSchemaId != 0 { + i = encodeVarint(dAtA, i, uint64(m.JsonContextSchemaId)) + i-- + dAtA[i] = 0x28 + } if m.JsonMessageKey != nil { size, err := m.JsonMessageKey.MarshalToSizedBufferVT(dAtA[:i]) if err != nil { @@ -1088,6 +1105,15 @@ func (m *StructuredLog) SizeVT() (n int) { l = m.JsonMessageKey.SizeVT() n += 1 + l + sov(uint64(l)) } + if m.JsonContextSchemaId != 0 { + n += 1 + sov(uint64(m.JsonContextSchemaId)) + } + if len(m.JsonContextValues) > 0 { + for _, e := range m.JsonContextValues { + l = e.SizeVT() + n += 1 + l + sov(uint64(l)) + } + } n += len(m.unknownFields) return n } @@ -2317,6 +2343,59 @@ func (m *StructuredLog) UnmarshalVT(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonContextSchemaId", wireType) + } + m.JsonContextSchemaId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.JsonContextSchemaId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonContextValues", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JsonContextValues = append(m.JsonContextValues, &DynamicValue{}) + if err := m.JsonContextValues[len(m.JsonContextValues)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skip(dAtA[iNdEx:])