prometheus-client-c: prom/include/prom_histogram.h Source File

prometheus-client-c 0.1.1 Prometheus client for the C programming language

prom_histogram.h
Go to the documentation of this file.
1 /*
2 Copyright 2019-2020 DigitalOcean Inc.
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15 */
16
22 #ifndef PROM_HISTOGRAM_INCLUDED
23 #define PROM_HISTOGRAM_INCLUDED
24
25 #include <stdlib.h>
26
27 #include "prom_histogram_buckets.h"
28 #include "prom_metric.h"
29
36 typedef prom_metric_t prom_histogram_t;
37
60 prom_histogram_t *prom_histogram_new(const char *name, const char *help, prom_histogram_buckets_t *buckets,
61 size_t label_key_count, const char **label_keys);
62
68 int prom_histogram_destroy(prom_histogram_t *self);
69
79 int prom_histogram_observe(prom_histogram_t *self, double value, const char **label_values);
80
81 #endif // PROM_HISTOGRAM_INCLUDED
prom_histogram_destroy
int prom_histogram_destroy(prom_histogram_t *self)
Destroy a prom_histogram_t*.
prom_metric_t
struct prom_metric prom_metric_t
A prometheus metric.
Definition: prom_metric.h:34
prom_histogram_buckets
Definition: prom_histogram_buckets.h:27
prom_histogram_t
prom_metric_t prom_histogram_t
A prometheus histogram.
Definition: prom_histogram.h:36
prom_histogram_new
prom_histogram_t * prom_histogram_new(const char *name, const char *help, prom_histogram_buckets_t *buckets, size_t label_key_count, const char **label_keys)
Construct a prom_histogram_t*.
prom_metric.h
Functions for retrieving metric samples from metrics given an ordered set of labels.
prom_histogram_observe
int prom_histogram_observe(prom_histogram_t *self, double value, const char **label_values)
Observe the prom_histogram_t given the value and labells.
prom_histogram_buckets.h
https://prometheus.io/docs/concepts/metric_types/#histogram