Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prometheus-cpp via ZeekBundle, drop legacy telemetry API #418

Merged
merged 5 commits into from
Jul 11, 2024

Conversation

ckreibich
Copy link
Member

This is an edit pass over @Neverlord's #402 with one real change: it now always uses the ZeekBundle approach to build prometheus-cpp, not just when building stand-alone. I also removed the iterative work on ZeekBundle.cmake since it moved to the cmake repo in the end.

@ckreibich ckreibich force-pushed the topic/christian/prometheus-cpp branch 3 times, most recently from d4a3d50 to 5426343 Compare July 10, 2024 23:31
@ckreibich ckreibich changed the title Add prometheus-cpp via ZeekBundle drop legacy telemetry API Add prometheus-cpp via ZeekBundle, drop legacy telemetry API Jul 11, 2024
@ckreibich ckreibich force-pushed the topic/christian/prometheus-cpp branch from 5426343 to 013a3ed Compare July 11, 2024 17:56
Neverlord and others added 4 commits July 11, 2024 12:11
This pulls in our new ZeekBundle abstraction to fully build a third-party
component into the build tree at configuration time, for subsequent processing
via regular add_library. The source location for the bundle is a regular git
submodule containing the Zeek project's fork of prometheus-cpp.

Co-authored-by: Christian Kreibich <[email protected]>
Add a new function pair `checked` and `checked_deref` to the `internal`
namespace that check whether a nullable type (such as `std::shared_ptr`)
contains a value before forwarding or using it. Both functions throw an
exception with a customizable error message if the check fails.

We use the new functions to make sure member variables are initialized
using a non-null value or to make sure a registry pointer is valid
before dereferencing it.
@ckreibich ckreibich force-pushed the topic/christian/prometheus-cpp branch from 013a3ed to 6050f42 Compare July 11, 2024 19:11
@ckreibich ckreibich merged commit fada26a into master Jul 11, 2024
1 of 19 checks passed
@ckreibich ckreibich deleted the topic/christian/prometheus-cpp branch July 11, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants