Commit Graph

44 Commits

Author SHA1 Message Date
Gregor Jasny cfa3ecb1ed feat: don't create temporary objects for serialization
Fix: #646
2023-12-28 21:41:06 +01:00
Gregor Jasny 6c161e5d77 chore(pull): remove pre v1.14 civetweb work-around 2023-12-27 14:15:32 +01:00
Gregor Jasny 8438ebda32 test(pull): add tests for authentication 2023-12-27 14:15:32 +01:00
Gregor Jasny bd80293328 chore: move base64 implementation into internal utility library 2023-12-18 10:00:58 +01:00
Gregor Jasny 5de72e811a feat: add base64 encoder 2023-12-18 10:00:58 +01:00
Gregor Jasny 89e79f2003 build: revert back to C++11
There seem to be many poor souls stuck to C++11. Because we
don't really depend on C++14 features let's wait for a reason
to bump up the standard to C++17 or later.

Close: #619
Fix: #618
Fix: #615
2022-11-28 22:41:49 +01:00
Gregor Jasny 20c468b6bd build: require C++14 2022-04-03 21:36:54 +02:00
Gregor Jasny b6615c7a62 fix(pull): Properly lock Exposer functions
Fixes: #529
2021-11-12 09:33:28 +01:00
Gregor Jasny a3e4d4289d chore(clang-tidy): Fix cppcoreguidelines-special-member-functions 2021-11-12 08:33:56 +01:00
Gregor Jasny 95ea1a3169 chore: prepare 0.13.0 release 2021-09-09 17:47:59 +02:00
Gregor Jasny 952c6bcdfe ci: Run iwyu 8.16 from Debian Experimental 2021-07-22 07:56:33 +02:00
Pavel Pimenov 722d8d0936 Update handler.cc
remove #include "prometheus/serializer.h"
2021-05-09 22:14:00 +02:00
Pavel Pimenov 91c4d5acf0 Update handler.cc 2021-05-09 22:14:00 +02:00
Pave Pimenov 7ebc0d2f96 fix make_unique 2021-05-09 22:14:00 +02:00
Gregor Jasny 8e74a80e50 pull: Prevent ABI break due to #479 2021-05-09 19:26:38 +02:00
kuvaldini 8416888625 Add CivetCallbacks to Exposer ctor
This change adds customizability to the embedded civetweb server by passing through a callbacks struct. This can be used to customize logging, etc.

Signed-off-by: kuvaldini <ivan@kuvaldini.pro>

closes #479
2021-05-01 10:54:48 -07:00
Gregor Jasny 5b465a4e6c pull: Announce utf-8 content encoding
Closes: #377
2021-03-09 13:01:15 +01:00
Gregor Jasny f448b2c3de feat(iwyu): Organize includes with include-what-you-use 2021-03-03 22:11:10 +01:00
Gregor Jasny 114f756f19 pull: don't set auth handler to nullptr to avoid civetweb bug 2020-12-27 13:06:58 +01:00
Mark Klein (mklein201) bd887dafbd pull: Add RemoveCollectable
Closes: #415
2020-12-17 19:32:14 +01:00
Gregor Jasny 87f93a1e38 pull: Work-around assertion and race-condition in auth handler 2020-12-16 21:18:59 +01:00
Gregor Jasny 9638191bc9 pull: Add integration test for exposer 2020-12-16 20:10:49 +01:00
Gregor Jasny fa49acc155 pull: Remove expired weak pointers to avoid leak 2020-12-14 21:33:09 +01:00
Gregor Jasny 1101626fb7 pull: do not export BasicAuthHandler 2020-12-13 16:58:53 +01:00
Gregor Jasny bb017ec15a pull: Use internal base64 decoding function to avoid dependency (#417) 2020-11-23 14:44:04 -08:00
Michael Mlsna 2501c04f80 Avoid race when registering a collectable
A thread registering a `Collectable` with the `Exposer` may end up
invalidating iterators to the `collectables_` vector inside `Endpoint`
while a `CivetServer` handler thread is iterating the vector.

Move the `collectables_` vector to `MetricsHandler` where all accesses
can be guarded by a mutex.
2020-09-10 17:52:04 -05:00
Gregor Jasny 4fc553e692 Use header-only cppcodec lib and fix build
Closes: #372
2020-06-07 12:01:29 +02:00
James Harrison 498c3c978c Add support for HTTP Basic Auth on scraping endpoints
Adds a simple HTTP Basic Auth handler which can be registered to
endpoints.

This provides a mechanism for extracting user/password from the auth
header; all further authentication logic is left to the user.
2020-06-05 11:49:04 +01:00
Gregor Jasny 8b45141a1c Extend existing exposer interface 2020-05-26 08:44:48 +02:00
James Harrison cc282f9985 Add support for serving multiple paths
Allows users to specify multiple Endpoints, and register Collectables
to each Endpoint. E.g.,

 /metrics

and

 /metricsHighCardinality

Can both be served by the same MultiExposer, but may expose different
Collectables. This may be useful if, for example, one wants to scrape
groups of metrics with different frequencies.

Each Endpoint must have a unique URI.
2020-05-13 14:56:41 +01:00
Gregor Jasny 4ee54a1651 chore(pull): refactor collection code into metrics_collector 2020-04-25 15:50:34 +02:00
Gregor Jasny c06e0ef4e4 pull: Add support for https and client certificates
Issue: #329
2020-03-17 18:39:12 +01:00
Gregor Jasny 3018a51030 feat(pull): Add getter for listening ports
Closes: #334
2020-02-12 21:01:44 +01:00
Gregor Jasny c216ae7ae9 chore(clang-format): Format everything 2019-10-17 18:13:24 +02:00
matthew a34ead7027 include fixes 2019-08-08 09:52:41 -07:00
Dmitry Khvorov de62eac55b configure number of threads used by Exposer 2018-12-10 17:59:17 +08:00
Jerry Crunctime e38d0206c9 Fix all warnings 2018-12-08 11:15:23 +01:00
Gregor Jasny e85603a41f Reformat everything
using clang-format version 8.0.0 (tags/google/stable/2018-10-04)
2018-12-06 20:43:41 +01:00
Gregor Jasny 3448ef0754 Breaking Change: Use recommended metric naming
The sample_server is now `promtool check`-clean.

See: https://prometheus.io/docs/practices/naming/

Issue: #89
2018-11-11 21:39:10 +01:00
Jerry Crunchtime e0502287ee Include what is used 2018-10-25 14:48:14 +02:00
Gregor Jasny e70ced1b31 Use ranged insert for metrics collection 2018-10-14 18:46:43 +02:00
Gregor Jasny 42f479860c pull: Send out missing gzip header
Closes: #151
2018-09-18 17:11:08 +02:00
Gregor Jasny 98869d9779 pull: Add support for gzip compression
Fixes: #141
2018-09-05 10:51:57 +02:00
Gregor Jasny fab3f3baad Move generic library into core and pull 2018-07-04 22:18:44 +02:00