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

Disable metric label extraction from tracing due to high cpu cost #1569

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions crates/tracing-instrumentation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ mod tracer;
use crate::pretty::PrettyFields;
use crate::processor::ResourceModifyingSpanProcessor;
use crate::tracer::SpanModifyingTracer;
use metrics_tracing_context::MetricsLayer;
use opentelemetry::trace::{TraceError, TracerProvider};
use opentelemetry::KeyValue;
use opentelemetry_contrib::trace::exporter::jaeger_json::JaegerJsonExporter;
Expand Down Expand Up @@ -189,11 +188,13 @@ pub fn init_tracing_and_logging(
let filter = EnvFilter::try_new(&common_opts.log_filter)?;
let (filter, reload_handle) = tracing_subscriber::reload::Layer::new(filter);
// Logging layer
let layers = layers
.with(build_logging_layer(common_opts)?.with_filter(filter))
// Enables auto extraction of selected span labels in emitted metrics.
// allowed labels are defined in restate_node_ctrl::metrics::ALLOWED_LABELS.
.with(MetricsLayer::new());
let layers = layers.with(build_logging_layer(common_opts)?.with_filter(filter));
// Enables auto extraction of selected span labels in emitted metrics.
// allowed labels are defined in restate_node_ctrl::metrics::ALLOWED_LABELS.
//
// This is temporarily disabled due to its performance cost. This will be re-enabled when it
// gets benchmarked and optimized.
//.with(MetricsLayer::new());

// Console subscriber layer
#[cfg(feature = "console-subscriber")]
Expand Down
Loading