From 2fb3529dfcbefbb2f4b60d8eb62d426782268074 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Wed, 1 Oct 2025 11:42:35 +0200 Subject: [PATCH] proto_c: regenerate logs protobuf C files v1.8.0 This uses version 1.8.0 of the opentelemetry-proto files for logs. It makes the event_name available for usage in fluent-bit. Updating the all files to 1.8.0 is more difficult as especially profile has changed a lot. Signed-off-by: Pascal Bach --- .../opentelemetry/proto/logs/v1/logs.pb-c.c | 19 +++++++++++++++--- .../opentelemetry/proto/logs/v1/logs.pb-c.h | 20 +++++++++++++++---- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/proto_c/opentelemetry/proto/logs/v1/logs.pb-c.c b/proto_c/opentelemetry/proto/logs/v1/logs.pb-c.c index 9ecfa35..ad71180 100644 --- a/proto_c/opentelemetry/proto/logs/v1/logs.pb-c.c +++ b/proto_c/opentelemetry/proto/logs/v1/logs.pb-c.c @@ -353,7 +353,7 @@ const ProtobufCMessageDescriptor opentelemetry__proto__logs__v1__scope_logs__des (ProtobufCMessageInit) opentelemetry__proto__logs__v1__scope_logs__init, NULL,NULL,NULL /* reserved[123] */ }; -static const ProtobufCFieldDescriptor opentelemetry__proto__logs__v1__log_record__field_descriptors[10] = +static const ProtobufCFieldDescriptor opentelemetry__proto__logs__v1__log_record__field_descriptors[11] = { { "time_unix_nano", @@ -475,11 +475,24 @@ static const ProtobufCFieldDescriptor opentelemetry__proto__logs__v1__log_record 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "event_name", + 12, + PROTOBUF_C_LABEL_NONE, + PROTOBUF_C_TYPE_STRING, + 0, /* quantifier_offset */ + offsetof(Opentelemetry__Proto__Logs__V1__LogRecord, event_name), + NULL, + &protobuf_c_empty_string, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned opentelemetry__proto__logs__v1__log_record__field_indices_by_name[] = { 4, /* field[4] = attributes */ 3, /* field[3] = body */ 5, /* field[5] = dropped_attributes_count */ + 10, /* field[10] = event_name */ 6, /* field[6] = flags */ 9, /* field[9] = observed_time_unix_nano */ 1, /* field[1] = severity_number */ @@ -492,7 +505,7 @@ static const ProtobufCIntRange opentelemetry__proto__logs__v1__log_record__numbe { { 1, 0 }, { 5, 3 }, - { 0, 10 } + { 0, 11 } }; const ProtobufCMessageDescriptor opentelemetry__proto__logs__v1__log_record__descriptor = { @@ -502,7 +515,7 @@ const ProtobufCMessageDescriptor opentelemetry__proto__logs__v1__log_record__des "Opentelemetry__Proto__Logs__V1__LogRecord", "opentelemetry.proto.logs.v1", sizeof(Opentelemetry__Proto__Logs__V1__LogRecord), - 10, + 11, opentelemetry__proto__logs__v1__log_record__field_descriptors, opentelemetry__proto__logs__v1__log_record__field_indices_by_name, 2, opentelemetry__proto__logs__v1__log_record__number_ranges, diff --git a/proto_c/opentelemetry/proto/logs/v1/logs.pb-c.h b/proto_c/opentelemetry/proto/logs/v1/logs.pb-c.h index ea7f00f..ebed931 100644 --- a/proto_c/opentelemetry/proto/logs/v1/logs.pb-c.h +++ b/proto_c/opentelemetry/proto/logs/v1/logs.pb-c.h @@ -10,7 +10,7 @@ PROTOBUF_C__BEGIN_DECLS #if PROTOBUF_C_VERSION_NUMBER < 1003000 # error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers. -#elif 1005000 < PROTOBUF_C_MIN_COMPILER_VERSION +#elif 1004001 < PROTOBUF_C_MIN_COMPILER_VERSION # error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c. #endif @@ -128,7 +128,8 @@ struct Opentelemetry__Proto__Logs__V1__ResourceLogs Opentelemetry__Proto__Logs__V1__ScopeLogs **scope_logs; /* * The Schema URL, if known. This is the identifier of the Schema that the resource data - * is recorded in. To learn more about Schema URL see + * is recorded in. Notably, the last part of the URL path is the version number of the + * schema: http[s]://server[:port]/path/. To learn more about Schema URL see * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url * This schema_url applies to the data in the "resource" field. It does not apply * to the data in the "scope_logs" field which have their own schema_url field. @@ -159,7 +160,8 @@ struct Opentelemetry__Proto__Logs__V1__ScopeLogs Opentelemetry__Proto__Logs__V1__LogRecord **log_records; /* * The Schema URL, if known. This is the identifier of the Schema that the log data - * is recorded in. To learn more about Schema URL see + * is recorded in. Notably, the last part of the URL path is the version number of the + * schema: http[s]://server[:port]/path/. To learn more about Schema URL see * https://opentelemetry.io/docs/specs/otel/schemas/#schema-url * This schema_url applies to all logs in the "logs" field. */ @@ -256,10 +258,20 @@ struct Opentelemetry__Proto__Logs__V1__LogRecord * - the field contains an invalid value. */ ProtobufCBinaryData span_id; + /* + * A unique identifier of event category/type. + * All events with the same event_name are expected to conform to the same + * schema for both their attributes and their body. + * Recommended to be fully qualified and short (no longer than 256 characters). + * Presence of event_name on the log record identifies this record + * as an event. + * [Optional]. + */ + char *event_name; }; #define OPENTELEMETRY__PROTO__LOGS__V1__LOG_RECORD__INIT \ { PROTOBUF_C_MESSAGE_INIT (&opentelemetry__proto__logs__v1__log_record__descriptor) \ - , 0, 0, OPENTELEMETRY__PROTO__LOGS__V1__SEVERITY_NUMBER__SEVERITY_NUMBER_UNSPECIFIED, (char *)protobuf_c_empty_string, NULL, 0,NULL, 0, 0, {0,NULL}, {0,NULL} } + , 0, 0, OPENTELEMETRY__PROTO__LOGS__V1__SEVERITY_NUMBER__SEVERITY_NUMBER_UNSPECIFIED, (char *)protobuf_c_empty_string, NULL, 0,NULL, 0, 0, {0,NULL}, {0,NULL}, (char *)protobuf_c_empty_string } /* Opentelemetry__Proto__Logs__V1__LogsData methods */