Remove Sentry breadcrumbs from network requests
There ends up being a multi-hour gap between the breadcrumbs listed and the error itself, so they're useless.
This commit is contained in:
parent
3ff6bc9518
commit
0e90ee527c
|
@ -24,19 +24,11 @@ defmodule Frenzy.Network do
|
|||
|
||||
@spec http_get(String.t()) :: Tesla.Env.result()
|
||||
def http_get(url) do
|
||||
if Frenzy.sentry_enabled?() do
|
||||
Sentry.Context.add_breadcrumb(%{category: "http_get", message: url})
|
||||
end
|
||||
|
||||
HTTP.get(url)
|
||||
end
|
||||
|
||||
@spec http_post(String.t(), Tesla.Env.body(), [Tesla.option()]) :: Tesla.Env.result()
|
||||
def http_post(url, body, options \\ []) do
|
||||
if Frenzy.sentry_enabled?() do
|
||||
Sentry.Context.add_breadcrumb(%{category: "http_get", message: url})
|
||||
end
|
||||
|
||||
HTTP.post(url, body, options)
|
||||
end
|
||||
|
||||
|
@ -91,10 +83,6 @@ defmodule Frenzy.Network do
|
|||
@spec gemini_request(String.t() | URI.t()) :: {:ok, Gemini.Response.t()} | {:error, term()}
|
||||
|
||||
def gemini_request(uri) do
|
||||
if Frenzy.sentry_enabled?() do
|
||||
Sentry.Context.add_breadcrumb(%{category: "gemini_request", message: uri})
|
||||
end
|
||||
|
||||
case Gemini.request(uri) do
|
||||
{:ok, %Gemini.Response{status: code} = response} when code in @gemini_success_codes ->
|
||||
{:ok, response}
|
||||
|
|
Loading…
Reference in New Issue