Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/fluent-bit/flb_input_chunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ int flb_input_chunk_set_up_down(struct flb_input_chunk *ic);
int flb_input_chunk_set_up(struct flb_input_chunk *ic);
int flb_input_chunk_down(struct flb_input_chunk *ic);
int flb_input_chunk_is_up(struct flb_input_chunk *ic);
int flb_input_chunk_find_space_new_data(struct flb_input_chunk *ic,
size_t chunk_size);
int flb_input_chunk_has_overlimit_routes(struct flb_input_chunk *ic,
size_t chunk_size);
void flb_input_chunk_update_output_instances(struct flb_input_chunk *ic,
size_t chunk_size);

Expand Down
29 changes: 29 additions & 0 deletions lib/cmetrics/include/cmetrics/cmt_encode_opentelemetry.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,36 @@ struct cmt_opentelemetry_context
struct cmt *cmt;
};

struct cmt_opentelemetry_batch {
cfl_sds_t payload;
size_t data_point_count;
};

struct cmt_opentelemetry_batches {
size_t count;
struct cmt_opentelemetry_batch *entries;
};

cfl_sds_t cmt_encode_opentelemetry_create(struct cmt *cmt);
void cmt_encode_opentelemetry_destroy(cfl_sds_t text);

/*
* Split an encoded OTLP ExportMetricsServiceRequest without changing metric,
* resource, or scope metadata. A zero limit returns the original request as a
* single batch. The returned payloads are owned by the batch collection.
*/
struct cmt_opentelemetry_batches *
cmt_encode_opentelemetry_split_payload(const void *payload,
size_t payload_size,
size_t max_data_points,
int *result);

struct cmt_opentelemetry_batches *
cmt_encode_opentelemetry_create_batches(struct cmt *context,
size_t max_data_points,
int *result);

void cmt_encode_opentelemetry_destroy_batches(
struct cmt_opentelemetry_batches *batches);

#endif
1 change: 1 addition & 0 deletions lib/cmetrics/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set(src
cmt_filter.c
cmetrics.c
cmt_encode_opentelemetry.c
cmt_encode_opentelemetry_batch.c
cmt_decode_opentelemetry.c
cmt_encode_prometheus.c
cmt_encode_prometheus_remote_write.c
Expand Down
Loading
Loading