diff --git a/crates/nailconfig/src/lib.rs b/crates/nailconfig/src/lib.rs index 8553ef1..104b962 100644 --- a/crates/nailconfig/src/lib.rs +++ b/crates/nailconfig/src/lib.rs @@ -105,6 +105,7 @@ pub struct OpenTelemetryConfig { pub service_name: String, pub logs: bool, pub traces: bool, + pub record_details: bool, } pub fn get_configuration() -> Result> { diff --git a/crates/nailserve/src/lib.rs b/crates/nailserve/src/lib.rs index e0e2e1c..eff8c0f 100644 --- a/crates/nailserve/src/lib.rs +++ b/crates/nailserve/src/lib.rs @@ -23,7 +23,9 @@ async fn server_loop( ) -> color_eyre::Result<()> { let server = Builder::new(HyperExecutor::new()); - let is_traced = app.config.open_telemetry.logs || app.config.open_telemetry.traces; + let is_traced = app.config.open_telemetry.logs + || app.config.open_telemetry.traces + || app.config.open_telemetry.record_details; let partial_service = Rc::new(NormalizeUrls::new(Rc::new(TraceConnection::new( is_traced, diff --git a/defaults/pit.default.toml b/defaults/pit.default.toml index cebe9fd..c77822a 100644 --- a/defaults/pit.default.toml +++ b/defaults/pit.default.toml @@ -99,3 +99,7 @@ logs = false # Enable collecting trace data to OTEL collector. This option imposes a significant overhead, so only # enable it if you have the capacity for storing the data, which can be a lot during heavy traffic. traces = false +# Enable recording request details to the log output. If you don't want to send stuff to an OTEL collector +# but still want the specific request data for new peers and rate-limited peers, this setting will allow one +# to still have that getting outputted to the console/logger. Disable this if you don't want extra info. +record_details = true