Skip to content

Commit dc440d4

Browse files
committed
Fix Mix warning about missing :opentelemetry app when MIX_TARGET != application
1 parent 03c10a2 commit dc440d4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/sync-service/config/runtime.exs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,6 @@ config :electric,
274274
nil
275275
)
276276

277-
# Disable opentelemetry_exporter by default.
278-
#
279-
# Without any explicit config, opentelemetry starts some resource detectors and initializes
280-
# otel_batch_processor which then tries to communicate with a remote OTLP server
281-
# (localhost:4318 by default) periodically.
282-
#
283-
# We don't want any of that unless OpenTelemetry export is explicitly enabled further down.
284-
config :opentelemetry, processors: []
285-
286277
if Electric.telemetry_enabled?() do
287278
# Disable the default telemetry_poller process since we start our own in
288279
# `ElectricTelemetry.{ApplicationTelemetry, StackTelemetry}`.
@@ -357,5 +348,14 @@ if Electric.telemetry_enabled?() do
357348
}
358349
}}
359350
]
351+
else
352+
# Disable opentelemetry_exporter.
353+
#
354+
# Without any explicit config, opentelemetry starts some resource detectors and initializes
355+
# otel_batch_processor which then tries to communicate with a remote OTLP server
356+
# (localhost:4318 by default) periodically.
357+
#
358+
# We don't want any of that unless OpenTelemetry export is explicitly enabled.
359+
config :opentelemetry, processors: []
360360
end
361361
end

0 commit comments

Comments
 (0)