Skip to content

Commit

Permalink
metrics_exporter: use sds to get metric name
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Jul 16, 2024
1 parent 239ca35 commit 133ae8a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/flb_metrics_exporter.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ static int collect_inputs(msgpack_sbuffer *mp_sbuf, msgpack_packer *mp_pck,
}

flb_metrics_dump_values(&buf, &s, i->metrics);
msgpack_pack_str(mp_pck, i->metrics->title_len);
msgpack_pack_str_body(mp_pck, i->metrics->title, i->metrics->title_len);
msgpack_pack_str(mp_pck, flb_sds_len(i->metrics->title));
msgpack_pack_str_body(mp_pck, i->metrics->title, flb_sds_len(i->metrics->title));
msgpack_sbuffer_write(mp_sbuf, buf, s);
flb_free(buf);
}
Expand Down Expand Up @@ -100,8 +100,8 @@ static int collect_filters(msgpack_sbuffer *mp_sbuf, msgpack_packer *mp_pck,
}

flb_metrics_dump_values(&buf, &s, i->metrics);
msgpack_pack_str(mp_pck, i->metrics->title_len);
msgpack_pack_str_body(mp_pck, i->metrics->title, i->metrics->title_len);
msgpack_pack_str(mp_pck, flb_sds_len(i->metrics->title));
msgpack_pack_str_body(mp_pck, i->metrics->title, flb_sds_len(i->metrics->title));
msgpack_sbuffer_write(mp_sbuf, buf, s);
flb_free(buf);
}
Expand Down Expand Up @@ -137,8 +137,8 @@ static int collect_outputs(msgpack_sbuffer *mp_sbuf, msgpack_packer *mp_pck,
}

flb_metrics_dump_values(&buf, &s, i->metrics);
msgpack_pack_str(mp_pck, i->metrics->title_len);
msgpack_pack_str_body(mp_pck, i->metrics->title, i->metrics->title_len);
msgpack_pack_str(mp_pck, flb_sds_len(i->metrics->title));
msgpack_pack_str_body(mp_pck, i->metrics->title, flb_sds_len(i->metrics->title));
msgpack_sbuffer_write(mp_sbuf, buf, s);
flb_free(buf);
}
Expand Down

0 comments on commit 133ae8a

Please sign in to comment.