Skip to content

Commit d79b100

Browse files
committed
in_opentelemetry: fix finalization of group for gRPC payload
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 93c106a commit d79b100

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugins/in_opentelemetry/opentelemetry_prot.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static int process_payload_raw_traces(struct flb_opentelemetry *ctx, struct http
202202
msgpack_pack_array(&mp_pck, 2);
203203
flb_pack_time_now(&mp_pck);
204204

205-
/* Check if the incoming payload is a valid JSON message and convert it to msgpack */
205+
/* Check if the incoming payload is a valid message and convert it to msgpack */
206206
ret = flb_pack_json(request->data.data, request->data.len,
207207
&out_buf, &out_size, &root_type, NULL);
208208

@@ -686,7 +686,8 @@ static int binary_payload_to_msgpack(struct flb_opentelemetry *ctx,
686686
flb_plg_error(ctx->ins, "could not set group content metadata");
687687
goto binary_payload_to_msgpack_end;
688688
}
689-
flb_log_event_encoder_group_header_end(encoder);
689+
690+
flb_log_event_encoder_group_end(encoder);
690691

691692
msgpack_sbuffer_clear(&mp_sbuf);
692693

@@ -2856,7 +2857,6 @@ int opentelemetry_prot_handle_ng(struct flb_http_request *request,
28562857
strcmp(request->path, "/opentelemetry.proto.collector.metric.v1.MetricService/Export") == 0 ||
28572858
strcmp(request->path, "/opentelemetry.proto.collector.trace.v1.TraceService/Export") == 0 ||
28582859
strcmp(request->path, "/opentelemetry.proto.collector.log.v1.LogService/Export") == 0) {
2859-
28602860
grpc_request = FLB_TRUE;
28612861
}
28622862
else if (context->profile_support_enabled &&
@@ -2914,6 +2914,7 @@ int opentelemetry_prot_handle_ng(struct flb_http_request *request,
29142914
else {
29152915
tag = flb_sds_create(context->ins->tag);
29162916
}
2917+
29172918
result = process_payload_logs_ng(context, tag, request, response);
29182919
}
29192920
else if (context->profile_support_enabled &&

0 commit comments

Comments
 (0)