Make OTLP exporter optional and allow building without Prometheus exporter (/metrics) #372

Merged
lx merged 3 commits from jirutka/garage:telemetry-and-metrics into improve-deps 2022-09-06 13:11:33 +00:00
Contributor

Please see commit messages.

Please see commit messages.
lx approved these changes 2022-09-05 09:06:58 +00:00
Dismissed
lx left a comment
Owner

Thanks for making this, it's pretty much what I imagined. There's just a small issue with the warn! when OTLP is disabled (see below). Also if you have the opportunity of running cargo fmt and checking the cargo clippy lints, that would be nice (depending on your Clippy version, it might report a bunch of lints about Eq/PartialEq which we don't care about).

We also need to update the .nix files to integrate this with our CI but I can do it myself.

Thanks for making this, it's pretty much what I imagined. There's just a small issue with the `warn!` when OTLP is disabled (see below). Also if you have the opportunity of running `cargo fmt` and checking the `cargo clippy` lints, that would be nice (depending on your Clippy version, it might report a bunch of lints about `Eq`/`PartialEq` which we don't care about). We also need to update the `.nix` files to integrate this with our CI but I can do it myself.
@ -41,1 +45,4 @@
init_tracing(&export_to, garage.system.id)?;
#[cfg(not(feature = "telemetry-otlp"))]
warn!("Garage was built without OTLP exporter, admin.trace_sink is ignored.");
Owner

Looks like this will never be called because we are in a #[cfg(feature = "telemetry-otlp")] block

Looks like this will never be called because we are in a `#[cfg(feature = "telemetry-otlp")]` block
jirutka marked this conversation as resolved
lx dismissed lx's review 2022-09-05 09:07:44 +00:00
lx changed target branch from main to improve-deps 2022-09-05 10:21:56 +00:00
Owner

Changed to merge this into #373 (a temporary branch where I'll do the Nix shenanigans). This caused a conflict in src/garage/Cargo.toml because of #370.

Changed to merge this into #373 (a temporary branch where I'll do the Nix shenanigans). This caused a conflict in `src/garage/Cargo.toml` because of #370.
jirutka force-pushed telemetry-and-metrics from a095c831fc to 75b11bdfc1 2022-09-05 23:11:51 +00:00 Compare
jirutka force-pushed telemetry-and-metrics from 75b11bdfc1 to ea36b9ff90 2022-09-05 23:16:04 +00:00 Compare
Author
Contributor

Okay, I fixed it and rebased against the improve-deps branch.

Okay, I fixed it and rebased against the `improve-deps` branch.
Owner

Thanks for your contribution!

Thanks for your contribution!
lx merged commit ed7796924b into improve-deps 2022-09-06 13:11:33 +00:00
jirutka deleted branch telemetry-and-metrics 2022-09-25 12:54:20 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/garage#372
No description provided.