Commit Graph

91 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 2a39067b52 build: use Ubuntu 22.04 for clang-format 2023-12-28 20:59:13 +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 bb21a73ce8 build(bazel): use Bazel modules
Issue: #225 #507 #513 #581
Closes: #616
2023-02-01 10:12:09 +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
Johnny Jazeix 2ce3bb011e feat(core): Add Info metric 2022-06-18 14:36:33 +02:00
Gregor Jasny 1236f09eb4 fix: handle absolute paths in pkgconfig files
Fixes: #587
2022-05-20 10:31:39 +02:00
Gregor Jasny d647b6f42d fix: fix issues found by CLion static analyzer 2022-04-06 20:48:01 +02:00
Gregor Jasny 20c468b6bd build: require C++14 2022-04-03 21:36:54 +02:00
Leith Bade 47838c7587 Add missing std:: on size_t 2022-03-30 08:31:00 +02:00
Gregor Jasny 91dd416d76 chore(core): Introduce Labels type 2021-11-14 18:17:14 +01: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 3d24cf1e96 pull: Install header files for embedded civetweb
Fixes: #479
2021-05-09 19:37:44 +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 5699348faa feat(cmake): Generate pkg-config files
Fixes: #447
2021-03-04 21:15:31 +01:00
Gregor Jasny f448b2c3de feat(iwyu): Organize includes with include-what-you-use 2021-03-03 22:11:10 +01:00
Gregor Jasny af8449400d Merge pull request #435 from jupp0r/improve-example
pull: Add better example
2021-01-31 20:57:57 +01:00
Gregor Jasny 3c5d3c5775 pull: improve code coverage 2020-12-27 17:50:36 +01:00
Gregor Jasny b8db5e468d pull: don't trigger failing authentication due to civetweb/civetweb#954 2020-12-27 13:06:58 +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
Gregor Jasny eae808770a pull: test authentication and compression 2020-12-26 23:42:48 +01:00
Gregor Jasny fda05ed105 pull: Add better example
Closes: #423
2020-12-26 15:46:38 +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
Gregor Jasny 72b4d19943 pull: work-around missing winsock lib in civetweb
Fixes: #401
2020-11-15 20:27:22 +01:00
Gregor Jasny d68ddc2fa4 Merge pull request #390 from mlsna/fix-collectables-race
Avoid race when registering a collectable
2020-10-01 09:02:03 +02:00
Gregor Jasny d0e1056016 core: Explicitly link against libatomic when needed
Closes: #394
2020-09-27 16:34:40 +01: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 eef4b55b27 fix: Properly export civetweb object library 2020-03-20 18:28:54 +01:00
Gregor Jasny c06e0ef4e4 pull: Add support for https and client certificates
Issue: #329
2020-03-17 18:39:12 +01:00