cleanup final
This commit is contained in:
@@ -126,6 +126,7 @@ cli = ["clap", "comfy-table"]
|
||||
fs-credentials-storage = ["nym-credential-storage/persistent-storage"]
|
||||
fs-surb-storage = ["nym-client-core-surb-storage/fs-surb-storage"]
|
||||
fs-gateways-storage = ["nym-client-core-gateways-storage/fs-gateways-storage"]
|
||||
otel = ["nym-sphinx/otel"]
|
||||
wasm = ["nym-gateway-client/wasm"]
|
||||
metrics-server = []
|
||||
|
||||
|
||||
@@ -166,7 +166,6 @@ impl ClientControlRequest {
|
||||
let context_carrier = {
|
||||
use nym_bin_common::opentelemetry::context::extract_trace_id_from_tracing_cx;
|
||||
let trace_id = extract_trace_id_from_tracing_cx();
|
||||
tracing::info!("[DEBUG] Trace id in new_authenticate_v2: {:?}", trace_id);
|
||||
|
||||
use tracing_opentelemetry::OpenTelemetrySpanExt;
|
||||
|
||||
|
||||
@@ -97,7 +97,9 @@ time = { workspace = true }
|
||||
default = []
|
||||
otel = [
|
||||
"nym-bin-common/otel",
|
||||
"nym-client-core/otel",
|
||||
"nym-gateway-requests/otel",
|
||||
"nym-sphinx/otel",
|
||||
"opentelemetry",
|
||||
"opentelemetry_sdk",
|
||||
"tracing-opentelemetry",
|
||||
|
||||
@@ -325,7 +325,7 @@ impl<R, S> AuthenticatedHandler<R, S> {
|
||||
let span = {
|
||||
let span = match &self.otel_propagator {
|
||||
Some(propagator) => info_span!(parent: &propagator.root_span, "handling_forward_sphinx"),
|
||||
None => info_span!("handling_forward_sphinx_no_otel"),
|
||||
None => debug_span!("handling_forward_sphinx_no_otel"),
|
||||
};
|
||||
span
|
||||
};
|
||||
@@ -611,6 +611,7 @@ impl<R, S> AuthenticatedHandler<R, S> {
|
||||
}
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
async fn handle_is_active_request(
|
||||
&mut self,
|
||||
reply_tx: IsActiveResultSender,
|
||||
@@ -659,7 +660,7 @@ impl<R, S> AuthenticatedHandler<R, S> {
|
||||
let from_client_span = {
|
||||
let span = match &self.otel_propagator {
|
||||
Some(propagator) => info_span!(parent: &propagator.root_span, "authenticated_client_handler_listen"),
|
||||
None => info_span!("authenticated_client_handler_listen_no_otel"),
|
||||
None => tracing::debug_span!("authenticated_client_handler_listen_no_otel"),
|
||||
};
|
||||
span
|
||||
};
|
||||
@@ -701,7 +702,7 @@ impl<R, S> AuthenticatedHandler<R, S> {
|
||||
}
|
||||
|
||||
if let Some(response) = self.handle_request(socket_msg).await {
|
||||
if let Err(err) = self.inner.send_websocket_message(response).await {
|
||||
if let Err(err) = self.inner.send_websocket_message(response).in_current_span().await {
|
||||
debug!(
|
||||
"Failed to send message over websocket: {err}. Assuming the connection is dead.",
|
||||
);
|
||||
|
||||
@@ -282,6 +282,7 @@ impl<R, S> FreshHandler<R, S> {
|
||||
///
|
||||
/// * `shared_keys`: keys derived between the client and gateway.
|
||||
/// * `packets`: unwrapped packets that are to be pushed back to the client.
|
||||
#[instrument(skip_all)]
|
||||
pub(crate) async fn push_packets_to_client(
|
||||
&mut self,
|
||||
shared_keys: &SharedGatewayKey,
|
||||
@@ -883,14 +884,14 @@ impl<R, S> FreshHandler<R, S> {
|
||||
#[cfg(feature = "otel")]
|
||||
let (context_propagator, otel_ctx) = if let ClientControlRequest::AuthenticateV2(ref auth_req) = request {
|
||||
if let Some(otel_context) = &auth_req.otel_context {
|
||||
warn!("=== OpenTelemetry context provided in the request: {otel_context:?} ===");
|
||||
info!("=== OpenTelemetry context provided in the request: {otel_context:?} ===");
|
||||
(Some(ManualContextPropagator::new("handling_initial_client_request_with_otel", otel_context.clone())), Some(otel_context.clone()))
|
||||
} else {
|
||||
warn!("No OpenTelemetry context provided in the request");
|
||||
debug!("No OpenTelemetry context provided in the request");
|
||||
(None, None)
|
||||
}
|
||||
} else {
|
||||
warn!("No OpenTelemetry context provided in the request");
|
||||
debug!("No OpenTelemetry context provided in the request");
|
||||
(None, None)
|
||||
};
|
||||
#[cfg(feature = "otel")]
|
||||
@@ -899,7 +900,7 @@ impl<R, S> FreshHandler<R, S> {
|
||||
let span = info_span!(parent: &propagator.root_span, "=== Handling initial client request with otel context ===");
|
||||
span
|
||||
}
|
||||
None => info_span!("=== Handling initial client request without otel context ==="),
|
||||
None => tracing::debug_span!("=== Handling initial client request without otel context ==="),
|
||||
};
|
||||
#[cfg(feature = "otel")]
|
||||
let _enter = child_span.enter();
|
||||
|
||||
@@ -25,7 +25,7 @@ async fn main() {
|
||||
let cx = tracing::Span::current().context();
|
||||
let sc = cx.span();
|
||||
let spcx = sc.span_context();
|
||||
tracing::info!("Current OTEL context: {:?}, trace_id: {:?}", cx, spcx.trace_id());
|
||||
tracing::debug!("Current OTEL context: {:?}, trace_id: {:?}", cx, spcx.trace_id());
|
||||
|
||||
// Ignore performance requirements for the sake of the example
|
||||
let mut debug_config = DebugConfig::default();
|
||||
|
||||
Reference in New Issue
Block a user