Skip to content
Merged
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
12 changes: 6 additions & 6 deletions src/flb_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,18 +332,18 @@ static int attach_hot_reload_info(struct flb_config *ctx, struct cmt *cmt, uint6
char *hostname)
{
double val;
struct cmt_gauge *g;
struct cmt_counter *c;

g = cmt_gauge_create(cmt, "fluentbit", "", "hot_reloaded_times",
"Collect the count of hot reloaded times.",
1, (char *[]) {"hostname"});
if (!g) {
c = cmt_counter_create(cmt, "fluentbit", "", "hot_reloaded_times",
"Collect the count of hot reloaded times.",
1, (char *[]) {"hostname"});
if (!c) {
return -1;
}

val = (double) ctx->hot_reloaded_count;

cmt_gauge_set(g, ts, val, 1, (char *[]) {hostname});
cmt_counter_set(c, ts, val, 1, (char *[]) {hostname});
return 0;
}

Expand Down