libprom  @VERSION@
C based libraries to expose metrics in Promtheus exposition format
prom/include/prom_histogram.h
Go to the documentation of this file.
00001 /*
00002 Copyright 2019-2020 DigitalOcean Inc.
00003 Copyright 2021 Jens Elkner <jel+libprom@cs.uni-magdeburg.de>
00004 
00005 
00006 Licensed under the Apache License, Version 2.0 (the "License");
00007 you may not use this file except in compliance with the License.
00008 You may obtain a copy of the License at
00009 
00010      http://www.apache.org/licenses/LICENSE-2.0
00011 
00012 Unless required by applicable law or agreed to in writing, software
00013 distributed under the License is distributed on an "AS IS" BASIS,
00014 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 See the License for the specific language governing permissions and
00016 limitations under the License.
00017 */
00018 
00024 #ifndef PROM_HISTOGRAM_INCLUDED
00025 #define PROM_HISTOGRAM_INCLUDED
00026 
00027 #include <stdlib.h>
00028 
00029 #include "prom_histogram_buckets.h"
00030 #include "prom_metric.h"
00031 
00038 typedef prom_metric_t prom_histogram_t;
00039 
00062 prom_histogram_t *prom_histogram_new(const char *name, const char *help, phb_t *buckets, size_t label_key_count, const char **label_keys);
00063 
00070 int prom_histogram_destroy(prom_histogram_t *self);
00071 
00083 int prom_histogram_observe(prom_histogram_t *self, double value, const char **label_values);
00084 
00085 #endif  // PROM_HISTOGRAM_INCLUDED
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines