Configure OTLP exporter in prod

This commit is contained in:
Shadowfacts 2024-04-24 10:50:18 -04:00
parent 4006e65222
commit 558180297a
1 changed files with 12 additions and 0 deletions

View File

@ -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