Skip to content

Commit 0f300b8

Browse files
committed
in_opentelemetry: fix groups encoding by closing headers properly
Groups encoding where not closing the msgpack map header, additionaly once the group header was finished instead of closing it we were appending the group finalization record (-2). Signed-off-by: Eduardo Silva <[email protected]>
1 parent 78bddba commit 0f300b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/in_opentelemetry/opentelemetry_logs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ static int binary_payload_to_msgpack(struct flb_opentelemetry *ctx,
13211321
msgpack_pack_uint64(&mp_pck, resource->dropped_attributes_count);
13221322
}
13231323

1324-
1324+
flb_mp_map_header_end(&mh_tmp);
13251325

13261326
if (resource_log->schema_url) {
13271327
flb_mp_map_header_append(&mh);
@@ -1396,7 +1396,7 @@ static int binary_payload_to_msgpack(struct flb_opentelemetry *ctx,
13961396
goto binary_payload_to_msgpack_end;
13971397
}
13981398

1399-
flb_log_event_encoder_group_end(encoder);
1399+
flb_log_event_encoder_group_header_end(encoder);
14001400

14011401
msgpack_sbuffer_clear(&mp_sbuf);
14021402

0 commit comments

Comments
 (0)