From 9508ca852259547a1c4fda4fef5c40c737bf966b Mon Sep 17 00:00:00 2001 From: Ziinc Date: Fri, 5 Jul 2024 23:16:59 +0800 Subject: [PATCH] perf: completely disable opentelemetry sdk unless config is given (#2124) --- config/config.exs | 1 + config/runtime.exs | 1 + 2 files changed, 2 insertions(+) diff --git a/config/config.exs b/config/config.exs index 48396c326..351417f33 100644 --- a/config/config.exs +++ b/config/config.exs @@ -131,6 +131,7 @@ config :grpc, start_server: true config :logflare, Logflare.AlertsScheduler, init_task: {Logflare.Alerting, :init_alert_jobs, []} config :opentelemetry, + sdk_disabled: true, span_processor: :batch, traces_exporter: :none diff --git a/config/runtime.exs b/config/runtime.exs index b56761d23..6c462cbf6 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -292,6 +292,7 @@ if System.get_env("LOGFLARE_OTEL_ENDPOINT") do config :logflare, opentelemetry_enabled?: true config :opentelemetry, + sdk_disabled: false, traces_exporter: :otlp, sampler: {:parent_based,