calyptia: change ifdef for chunk tracing.
@@ -356,7 +356,7 @@ static int calyptia_http_do(struct flb_calyptia *ctx, struct flb_http_client *c,
sizeof(CALYPTIA_H_AGENT_TOKEN) - 1,
ctx->agent_token, flb_sds_len(ctx->agent_token));
}
-#ifdef FLB_TRACE
+#ifdef FLB_CHUNK_TRACE
else if (type == CALYPTIA_ACTION_TRACE) {
flb_http_add_header(c,
CALYPTIA_H_CTYPE, sizeof(CALYPTIA_H_CTYPE) - 1,
@@ -812,11 +812,11 @@ static int cb_calyptia_init(struct flb_output_instance *ins,
flb_sds_printf(&ctx->metrics_endpoint, CALYPTIA_ENDPOINT_METRICS,
ctx->agent_id);
-#ifdef FLB_TRACE
+#ifdef FLB_CHUNK_TRACE
ctx->trace_endpoint = flb_sds_create_size(256);
flb_sds_printf(&ctx->trace_endpoint, CALYPTIA_ENDPOINT_TRACE,
ctx->pipeline_id);
-#endif // FLB_TRACE
+#endif // FLB_CHUNK_TRACE
return 0;
}
@@ -849,7 +849,7 @@ static void cb_calyptia_flush(struct flb_event_chunk *event_chunk,
size_t off = 0;
size_t out_size = 0;
char *out_buf = NULL;
-#ifdef FLB_TRACE
+#ifdef FLB_CHUNK_TRACE
flb_sds_t json;
#endif
struct flb_upstream_conn *u_conn;
@@ -920,7 +920,7 @@ static void cb_calyptia_flush(struct flb_event_chunk *event_chunk,
}
}
-#ifdef FLB_TRACE
+#ifdef FLB_CHUNK_TRACE
if (event_chunk->type == (FLB_EVENT_TYPE_LOG | FLB_EVENT_TYPE_HAS_TRACE)) {
json = flb_pack_msgpack_to_json_format(event_chunk->data,
event_chunk->size,
@@ -955,7 +955,7 @@ static void cb_calyptia_flush(struct flb_event_chunk *event_chunk,
}
flb_sds_destroy(json);
}
-#endif // FLB_TRACE
+#endif // FLB_CHUNK_TRACE
flb_upstream_conn_release(u_conn);
flb_http_client_destroy(c);
@@ -994,11 +994,11 @@ static int cb_calyptia_exit(void *data, struct flb_config *config)
flb_sds_destroy(ctx->metrics_endpoint);
}
-#ifdef FLB_TRACE
+#ifdef FLB_CHUNK_TRACE
if (ctx->trace_endpoint) {
flb_sds_destroy(ctx->trace_endpoint);
}
-#endif // FLB_TRACE
+#endif // FLB_CHUNK_TRACE
if (ctx->fs) {
flb_fstore_destroy(ctx->fs);
@@ -1047,7 +1047,7 @@ static struct flb_config_map config_map[] = {
"Label to append to the generated metric."
},
-#ifdef FLB_TRACE
+#ifdef FLB_CHUNK_TRACE
{
FLB_CONFIG_MAP_STR, "pipeline_id", NULL,
0, FLB_TRUE, offsetof(struct flb_calyptia, pipeline_id),
