summaryrefslogtreecommitdiffstats
path: root/exporting/prometheus/prometheus.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-17 09:30:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-17 09:30:20 +0000
commit386ccdd61e8256c8b21ee27ee2fc12438fc5ca98 (patch)
treec9fbcacdb01f029f46133a5ba7ecd610c2bcb041 /exporting/prometheus/prometheus.c
parentAdding upstream version 1.42.4. (diff)
downloadnetdata-386ccdd61e8256c8b21ee27ee2fc12438fc5ca98.tar.xz
netdata-386ccdd61e8256c8b21ee27ee2fc12438fc5ca98.zip
Adding upstream version 1.43.0.upstream/1.43.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'exporting/prometheus/prometheus.c')
-rw-r--r--exporting/prometheus/prometheus.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c
index 2d0611fdf..9e3f4bbf1 100644
--- a/exporting/prometheus/prometheus.c
+++ b/exporting/prometheus/prometheus.c
@@ -292,7 +292,7 @@ struct format_prometheus_label_callback {
size_t count;
};
-static int format_prometheus_label_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data) {
+static int format_prometheus_label_callback(const char *name, const char *value, RRDLABEL_SRC ls __maybe_unused, void *data) {
struct format_prometheus_label_callback *d = (struct format_prometheus_label_callback *)data;
if (!should_send_label(d->instance, ls)) return 0;
@@ -333,11 +333,9 @@ void format_host_labels_prometheus(struct instance *instance, RRDHOST *host)
* @param data is the buffer used to add labels.
*/
-static int format_prometheus_chart_label_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data) {
+static int format_prometheus_chart_label_callback(const char *name, const char *value, RRDLABEL_SRC ls __maybe_unused, void *data) {
BUFFER *wb = data;
- (void)ls;
-
if (name[0] == '_' )
return 1;
@@ -496,7 +494,7 @@ static void generate_as_collected_prom_metric(BUFFER *wb,
struct gen_parameters *p,
int homogeneous,
int prometheus_collector,
- DICTIONARY *chart_labels)
+ RRDLABELS *chart_labels)
{
buffer_sprintf(wb, "%s_%s", p->prefix, p->context);
@@ -524,7 +522,7 @@ static void generate_as_collected_prom_metric(BUFFER *wb,
buffer_sprintf(wb, COLLECTED_NUMBER_FORMAT, p->rd->collector.last_collected_value);
if (p->output_options & PROMETHEUS_OUTPUT_TIMESTAMPS)
- buffer_sprintf(wb, " %llu\n", timeval_msec(&p->rd->collector.last_collected_time));
+ buffer_sprintf(wb, " %"PRIu64"\n", timeval_msec(&p->rd->collector.last_collected_time));
else
buffer_sprintf(wb, "\n");
}