Skip to content

Commit 92eb9b1

Browse files
[flagd-ui] Improve reliability (#2565)
* [flagd-ui] Improve reliability * mix format
1 parent d4a3610 commit 92eb9b1

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

src/flagd-ui/config/runtime.exs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,10 @@ if config_env() == :prod do
6060
check_origin: false,
6161
secret_key_base: secret_key_base
6262

63-
config :opentelemetry,
64-
span_processor: :batch,
65-
traces_exporter: :otlp
66-
67-
config :opentelemetry_exporter,
68-
otlp_protocol: :http_protobuf,
69-
otlp_endpoint: otel_endpoint
63+
config :opentelemetry, :processors,
64+
otel_batch_processor: %{
65+
exporter: {:opentelemetry_exporter, %{endpoints: [otel_endpoint]}}
66+
}
7067

7168
# ## SSL Support
7269
#

src/flagd-ui/lib/flagd_ui/application.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ defmodule FlagdUi.Application do
1010

1111
@impl true
1212
def start(_type, _args) do
13+
# Ensure inets is started before OpenTelemetry initialization
14+
:ok = Application.ensure_started(:inets)
15+
1316
children = [
1417
FlagdUiWeb.Telemetry,
1518
{DNSCluster, query: Application.get_env(:flagd_ui, :dns_cluster_query) || :ignore},

src/flagd-ui/lib/flagd_ui_web/live/advanced_editor.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ defmodule FlagdUiWeb.AdvancedEditor do
3737
{Phoenix.HTML.Form.normalize_value("textarea", @content)}
3838
</textarea>
3939
<div>
40-
4140
<button
4241
type="button"
4342
class="rounded bg-blue-500 px-8 py-4 font-medium text-white transition-colors duration-200 hover:bg-blue-600"
@@ -46,7 +45,6 @@ defmodule FlagdUiWeb.AdvancedEditor do
4645
Save
4746
</button>
4847
<p :if={@unsaved_changes} class="text-red-600">Unsaved changes</p>
49-
5048
</div>
5149
</.form>
5250
</div>

src/flagd-ui/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ defmodule FlagdUi.MixProject do
2727
def application do
2828
[
2929
mod: {FlagdUi.Application, []},
30-
extra_applications: [:logger, :runtime_tools]
30+
extra_applications: [:logger, :runtime_tools, :os_mon, :inets]
3131
]
3232
end
3333

0 commit comments

Comments
 (0)