We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d7cdf0b + c752698 commit a3273efCopy full SHA for a3273ef
lib/sentry/event.ex
@@ -157,11 +157,12 @@ defmodule Sentry.Event do
157
end
158
159
@spec add_metadata(Event.t) :: Event.t
160
- def add_metadata(state) do
+ def add_metadata(%Event{} = state) do
161
%{state |
162
- event_id: UUID.uuid4(:hex),
163
- timestamp: Util.iso8601_timestamp(),
164
- server_name: to_string(:net_adm.localhost)}
+ event_id: UUID.uuid4(:hex),
+ timestamp: Util.iso8601_timestamp(),
+ }
165
+ |> Map.update(:server_name, nil, fn(server_name) -> server_name || to_string(:net_adm.localhost) end)
166
167
168
@spec stacktrace_to_frames(Exception.stacktrace) :: [map]
0 commit comments