From c4b967833f26fcea69606f607808ced73616e1cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Szuma?= <56085570+Rados13@users.noreply.github.com> Date: Mon, 13 Feb 2023 10:47:39 +0100 Subject: [PATCH] Fix disabling exporter traces (#117) --- config/runtime.exs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index c72e6469..a1d79c3e 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -145,15 +145,16 @@ exporter = {} end -if otel_state != :purge, - do: - config(:opentelemetry, - processors: [ - otel_batch_processor: %{ - exporter: exporter - } - ] - ) +if otel_state != :purge do + config :opentelemetry, + processors: [ + otel_batch_processor: %{ + exporter: exporter + } + ] +else + config :opentelemetry, traces_exporter: :none +end config :membrane_videoroom_demo, VideoRoom.Repo, database: System.get_env("DATABASE"),