File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,12 @@ static int cb_ml_init(struct flb_filter_instance *ins,
369
369
"fluentbit" , "filter" , "emit_records_total" ,
370
370
"Total number of emitted records" ,
371
371
1 , (char * []) {"name" });
372
+ if (!ctx -> cmt_emitted ) {
373
+ flb_errno ();
374
+ flb_free (ctx );
375
+
376
+ return -1 ;
377
+ }
372
378
373
379
/* OLD api */
374
380
flb_metrics_add (FLB_MULTILINE_METRIC_EMITTED ,
@@ -382,6 +388,12 @@ static int cb_ml_init(struct flb_filter_instance *ins,
382
388
"fluentbit" , "filter" , "emit_truncated_total" ,
383
389
"Total number of truncated occurence of multiline" ,
384
390
1 , (char * []) {"name" });
391
+ if (!ctx -> cmt_truncated ) {
392
+ flb_errno ();
393
+ flb_free (ctx );
394
+
395
+ return -1 ;
396
+ }
385
397
386
398
/* OLD api */
387
399
flb_metrics_add (FLB_MULTILINE_METRIC_TRUNCATED ,
You can’t perform that action at this time.
0 commit comments