Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions plugins/in_opentelemetry/opentelemetry_logs.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ static int otlp_pack_any_value(msgpack_packer *mp_pck,

result = -2;

if (body == NULL) {
msgpack_pack_nil(mp_pck);
return 0;
}

switch(body->value_case){
case OPENTELEMETRY__PROTO__COMMON__V1__ANY_VALUE__VALUE_STRING_VALUE:
result = otel_pack_string(mp_pck, body->string_value);
Expand Down Expand Up @@ -537,6 +542,7 @@ static int binary_payload_to_msgpack(struct flb_opentelemetry *ctx,
}
else {
if (ctx->logs_body_key == NULL &&
log_records[log_record_index]->body != NULL &&
log_records[log_record_index]->body->value_case ==
OPENTELEMETRY__PROTO__COMMON__V1__ANY_VALUE__VALUE_KVLIST_VALUE) {
ret = flb_log_event_encoder_set_body_from_raw_msgpack(
Expand Down
Loading