input_chunk: add macros for logs, metrics and traces
#define FLB_INPUT_CHUNK_MAGIC_BYTE_1 (unsigned char) 0x77
/* Chunk types: Log, Metrics and Traces are supported */
-#define FLB_INPUT_CHUNK_TYPE_LOG 0
-#define FLB_INPUT_CHUNK_TYPE_METRIC 1
+#define FLB_INPUT_CHUNK_TYPE_LOGS 0
+#define FLB_INPUT_CHUNK_TYPE_METRICS 1
#define FLB_INPUT_CHUNK_TYPE_TRACES 2
#ifdef FLB_HAVE_CHUNK_TRACE
#define FLB_INPUT_CHUNK_TAG_MAX (65535 - FLB_INPUT_CHUNK_META_HEADER)
struct flb_input_chunk {
- int event_type; /* chunk type: logs or metrics */
+ int event_type; /* chunk type: logs, metrics or traces */
bool fs_counted;
int busy; /* buffer is being flushed */
int fs_backlog; /* chunk originated from fs backlog */
@@ -81,7 +81,7 @@ struct flb_input_chunk {
struct mk_list _head;
};
-struct flb_input_chunk *flb_input_chunk_create(struct flb_input_instance *in,
+struct flb_input_chunk *flb_input_chunk_create(struct flb_input_instance *in, int event_type,
const char *tag, int tag_len);
int flb_input_chunk_destroy(struct flb_input_chunk *ic, int del);
void flb_input_chunk_destroy_all(struct flb_input_instance *in);
