Skip to content

Commit

Permalink
otel: do not drop non .otel_raw messages in parser
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
  • Loading branch information
alltilla committed Aug 2, 2023
1 parent 97dd1b3 commit a1bc6e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/grpc/otel/otel-protobuf-parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,12 @@ syslogng::grpc::otel::ProtobufParser::process(LogMessage *msg)
LogMessageValueType log_msg_type;
const gchar *type = log_msg_get_value_by_name_with_type(msg, ".otel_raw.type", &len, &log_msg_type);

if (log_msg_type == LM_VT_NULL)
{
/* Not an opentelemetry() message or it is a syslog-ng-otlp() message already parsed in the source */
return true;
}

if (log_msg_type != LM_VT_STRING)
{
msg_error("OpenTelemetry: unexpected .otel_raw.type LogMessage type",
Expand Down

0 comments on commit a1bc6e6

Please sign in to comment.