File tree Expand file tree Collapse file tree 1 file changed +0
-42
lines changed Expand file tree Collapse file tree 1 file changed +0
-42
lines changed Original file line number Diff line number Diff line change @@ -134,48 +134,6 @@ defmodule Sentry.Test do
134134 end
135135 end
136136
137- # Used internally when reporting a transaction, *before* reporting the actual transaction.
138- @ doc false
139- @ spec maybe_collect ( Sentry.Transaction . t ( ) ) :: :collected | :not_collecting
140- def maybe_collect ( % Sentry.Transaction { } = transaction ) do
141- if Sentry.Config . test_mode? ( ) do
142- dsn_set? = not is_nil ( Sentry.Config . dsn ( ) )
143- ensure_ownership_server_started ( )
144-
145- case NimbleOwnership . fetch_owner ( @ server , callers ( ) , @ transaction_key ) do
146- { :ok , owner_pid } ->
147- result =
148- NimbleOwnership . get_and_update (
149- @ server ,
150- owner_pid ,
151- @ transaction_key ,
152- fn transactions ->
153- { :collected , ( transactions || [ ] ) ++ [ transaction ] }
154- end
155- )
156-
157- case result do
158- { :ok , :collected } ->
159- :collected
160-
161- { :error , error } ->
162- raise ArgumentError ,
163- "cannot collect Sentry transactions: #{ Exception . message ( error ) } "
164- end
165-
166- :error when dsn_set? ->
167- :not_collecting
168-
169- # If the :dsn option is not set and we didn't capture the transaction, it's alright,
170- # we can just swallow it.
171- :error ->
172- :collected
173- end
174- else
175- :not_collecting
176- end
177- end
178-
179137 @ doc """
180138 Starts collecting events from the current process.
181139
You can’t perform that action at this time.
0 commit comments