Skip to content

Commit

Permalink
out_calyptia: fixes to get calyptia cloud traces working.
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Whelan <[email protected]>
  • Loading branch information
pwhelan committed Aug 31, 2023
1 parent 1a68244 commit dc6d67c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion plugins/out_calyptia/calyptia.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,8 @@ static void cb_calyptia_flush(struct flb_event_chunk *event_chunk,
}

#ifdef FLB_HAVE_CHUNK_TRACE
if (event_chunk->type == (FLB_EVENT_TYPE_LOGS | FLB_EVENT_TYPE_HAS_TRACE)) {
// in_emitter no longer allows us to sent the event type so use the tag instead.
if (strcmp(event_chunk->tag, "trace") == 0) {
json = flb_pack_msgpack_to_json_format(event_chunk->data,
event_chunk->size,
FLB_PACK_JSON_FORMAT_STREAM,
Expand Down
2 changes: 1 addition & 1 deletion plugins/out_calyptia/calyptia.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#define CALYPTIA_ENDPOINT_CREATE "/v1/agents"
#define CALYPTIA_ENDPOINT_PATCH "/v1/agents/%s"
#define CALYPTIA_ENDPOINT_METRICS "/v1/agents/%s/metrics"
#define CALYPTIA_ENDPOINT_TRACE "/v1/traces/%s"
#define CALYPTIA_ENDPOINT_TRACE "/v1/pipelines/%s/trace_session/records"

/* Storage */
#define CALYPTIA_SESSION_FILE "session.CALYPTIA"
Expand Down
2 changes: 1 addition & 1 deletion src/flb_chunk_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ struct flb_chunk_trace_context *flb_chunk_trace_context_new(void *trace_input,
goto error_input;
}

output = flb_output_new(ctx->flb->config, output_name, data, 1);
output = flb_output_new(ctx->flb->config, output_name, data, 0);
if (output == NULL) {
flb_error("could not create trace output");
goto error_input;
Expand Down

0 comments on commit dc6d67c

Please sign in to comment.