Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy GTFS-RT : réduit volume de logs #4440

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/transport/lib/transport/telemetry.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule Transport.Telemetry do
# make it non-blocking, to ensure the traffic will be served quickly. this also means, though, we
# won't notice if a tracing of event fails
Task.start(fn ->
Logger.info("Telemetry event: processing #{type} proxy request for #{target}")
Logger.debug("Telemetry event: processing #{type} proxy request for #{target}")
count_event(target, event)
end)
end
Expand All @@ -49,7 +49,7 @@ defmodule Transport.Telemetry do
# make it non-blocking, to ensure the traffic will be served quickly. this also means, though, we
# won't notice if a tracing of event fails
Task.start(fn ->
Logger.info("Telemetry event: processing #{convert_to} conversions request for #{target}")
Logger.debug("Telemetry event: processing #{convert_to} conversions request for #{target}")
count_event(target, event, DateTime.utc_now(), :day)
end)
end
Expand Down
6 changes: 3 additions & 3 deletions apps/unlock/lib/controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ defmodule Unlock.Controller do

defp fetch_remote(%Unlock.Config.Item.Generic.HTTP{} = item) do
comp_fn = fn _key ->
Logger.info("Processing proxy request for identifier #{item.identifier}")
Logger.debug("Processing proxy request for identifier #{item.identifier}")

try do
Unlock.Telemetry.trace_request(item.identifier, :internal)
Expand All @@ -172,14 +172,14 @@ defmodule Unlock.Controller do

case outcome do
{:ok, result} ->
Logger.info("Proxy response for #{item.identifier} served from cache")
Logger.debug("Proxy response for #{item.identifier} served from cache")
result

{:commit, result, _options} ->
result

{:ignore, result} ->
Logger.info("Cache has been skipped for proxy response")
Logger.debug("Cache has been skipped for proxy response")
result

{:error, _error} ->
Expand Down
Loading