diff --git a/apps/opentelemetry_experimental/src/otel_log_handler.erl b/apps/opentelemetry_experimental/src/otel_log_handler.erl index bb7de276..95b9ae43 100644 --- a/apps/opentelemetry_experimental/src/otel_log_handler.erl +++ b/apps/opentelemetry_experimental/src/otel_log_handler.erl @@ -156,6 +156,7 @@ start_link(#{reg_name := RegName} = Config) -> Config2 :: config_private(), Reason :: term(). adding_handler(#{id := Id}=Config) -> + ok = start_apps(), RegName = ?name_to_reg_name(?MODULE, Id), AtomicRef = atomics:new(3, [{signed, true}]), Config1 = Config#{reg_name => RegName, @@ -374,6 +375,11 @@ terminate(_Reason, State, Data=#data{exporter=Exporter, %% Internal functions %%-------------------------------------------------------------------- +start_apps() -> + _ = application:ensure_all_started(opentelemetry_exporter), + _ = application:ensure_all_started(opentelemetry_experimental), + ok. + start(Id, Config) -> ChildSpec = #{id => Id, diff --git a/rebar.config b/rebar.config index 96c57c9a..9a445f3c 100644 --- a/rebar.config +++ b/rebar.config @@ -59,12 +59,12 @@ opentelemetry_zipkin_pb]}. -{dialyzer, [{warnings, [no_unknown]}]}. +%{dialyzer, [{warnings, [no_unknown]}]}. {cover_enabled, true}. {cover_export_enabled, true}. {covertool, [{coverdata_files, ["ct.coverdata"]}]}. -{cover_excl_apps, [opentelemetry_api_experimental, opentelemetry_experimental]}. +%{cover_excl_apps, [opentelemetry_api_experimental, opentelemetry_experimental]}. {cover_excl_mods, [opentelemetry_exporter_trace_service_pb, opentelemetry_trace_service, opentelemetry_zipkin_pb, opentelemetry_exporter_metrics_service_pb, opentelemetry_exporter_logs_service_pb,