Skip to content

Commit

Permalink
feat: rename to WarehouseEx
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziinc committed Aug 28, 2024
1 parent a1b58bc commit 9c71155
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
24 changes: 11 additions & 13 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -102,36 +102,34 @@ config :logflare_logger_backend,
api_key: System.get_env("LOGFLARE_LOGGER_BACKEND_API_KEY")
)

config :logflare_ex,
config :warehouse_ex,
filter_nil_kv_pairs.(
api_url: System.get_env("LOGFLARE_LOGGER_BACKEND_URL"),
api_key: System.get_env("LOGFLARE_LOGGER_BACKEND_API_KEY")
)

config :logflare_ex,
LogflareEx.LoggerBackend,
config :warehouse_ex,
WarehouseEx.LoggerBackend,
filter_nil_kv_pairs.(source_token: System.get_env("LOGFLARE_LOGGER_BACKEND_SOURCE_ID"))

config :logflare_ex,
LogflareEx.TelemetryReporter,
config :warehouse_ex,
WarehouseEx.TelemetryReporter,
filter_nil_kv_pairs.(
source_token: System.get_env("LOGFLARE_EX_TELEMETRY_SOURCE_TOKEN"),
flush_interval: 1_000,
batch_size: 100
source_token: System.get_env("LOGFLARE_TELEMETRY_REPORTER_SOURCE_TOKEN"),
)

config :logger,
backends:
[
:console,
if(System.get_env("LOGFLARE_LOGGER_BACKEND_URL") != nil,
do: LogflareLogger.HttpBackend,
else: nil
),
# if(System.get_env("LOGFLARE_LOGGER_BACKEND_URL") != nil,
# do: LogflareEx.LoggerBackend,
# do: LogflareLogger.HttpBackend,
# else: nil
# ),
if(System.get_env("LOGFLARE_LOGGER_BACKEND_URL") != nil,
do: WarehouseEx.LoggerBackend,
else: nil
),
if(System.get_env("LOGFLARE_LOGGER_JSON") == "true", do: LoggerJSON, else: nil)
]
|> Enum.filter(&(&1 != nil))
Expand Down
2 changes: 1 addition & 1 deletion lib/logflare/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ defmodule Logflare.Application do
Logflare.AlertsScheduler,

# telemetry reporter
{LogflareEx.TelemetryReporter, metrics: Logflare.Telemetry.metrics()}
{WarehouseEx.TelemetryReporter, metrics: Logflare.Telemetry.metrics()}
]
end

Expand Down

0 comments on commit 9c71155

Please sign in to comment.