Skip to content

Commit

Permalink
Correctly exclude double error reports < 1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryseed committed Dec 27, 2024
1 parent c742d61 commit 1730c85
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/new_relic/error/logger_filter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ defmodule NewRelic.Error.LoggerFilter do
:ignore
end

if NewRelic.Util.ConditionalCompile.match?("< 1.15.0") do
def filter(
%{
meta: %{error_logger: %{tag: :error_msg}},
msg: {:report, %{label: {_, :terminating}}}
},
_opts
) do
:ignore
end
end

def filter(
%{
meta: %{error_logger: %{tag: :error_msg}},
Expand Down
6 changes: 6 additions & 0 deletions lib/new_relic/util/conditional_compile.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
defmodule NewRelic.Util.ConditionalCompile do
@moduledoc false
def match?(version) do
Version.match?(System.version(), version)
end
end

0 comments on commit 1730c85

Please sign in to comment.