diff --git a/config/runtime.exs b/config/runtime.exs index 5e1d616..c8b8364 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -87,4 +87,16 @@ if config_env() == :prod do key_id: System.fetch_env!("APNS_KEY_ID"), team_id: System.fetch_env!("APNS_TEAM_ID"), bundle_id: System.fetch_env!("APNS_BUNDLE_ID") + + otlp_endpoint = System.get_env("OTLP_ENDPOINT") + + if otlp_endpoint do + config :opentelemetry, + span_processor: :batch, + traces_exporter: :otlp + + config :opentelemetry_exporter, + otlp_protocol: :grpc, + otlp_endpoint: otlp_endpoint + end end