libprom @VERSION@
C based libraries to expose metrics in Promtheus exposition format
Loading...
Searching...
No Matches
prom_histogram.h
Go to the documentation of this file.
1/*
2Copyright 2019-2020 DigitalOcean Inc.
3Copyright 2021 Jens Elkner <jel+libprom@cs.uni-magdeburg.de>
4
5
6Licensed under the Apache License, Version 2.0 (the "License");
7you may not use this file except in compliance with the License.
8You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing, software
13distributed under the License is distributed on an "AS IS" BASIS,
14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15See the License for the specific language governing permissions and
16limitations under the License.
17*/
18
24#ifndef PROM_HISTOGRAM_INCLUDED
25#define PROM_HISTOGRAM_INCLUDED
26
27#include <stdlib.h>
28
30#include "prom_metric.h"
31
39
62prom_histogram_t *prom_histogram_new(const char *name, const char *help, phb_t *buckets, size_t label_key_count, const char **label_keys);
63
71
83int prom_histogram_observe(prom_histogram_t *self, double value, const char **label_values);
84
85#endif // PROM_HISTOGRAM_INCLUDED
int prom_histogram_observe(prom_histogram_t *self, double value, const char **label_values)
Observe the given value of the given histogram with the given labels.
prom_histogram_t * prom_histogram_new(const char *name, const char *help, phb_t *buckets, size_t label_key_count, const char **label_keys)
Construct a new metric of type histogram (or short: histogram)
prom_metric_t prom_histogram_t
Prometheus metric: histogram.
Definition prom_histogram.h:38
int prom_histogram_destroy(prom_histogram_t *self)
Destroy the given histogram.
https://prometheus.io/docs/concepts/metric_types/#histogram
Functions for retrieving metric samples from metrics given an ordered set of labels.
struct prom_metric prom_metric_t
A prometheus metric.
Definition prom_metric.h:43
Definition prom_histogram_buckets.h:30