Fix error backend with conn test on OTP 20 (#748)
Fix error backend with conn test on OTP 20 (#748)

Since `Logger` uses Erlang's legacy `:error_logger` instead of the newer
`:logger`, the error backend test with a Plug `conn` failed on OTP 20.

That's caused by a difference in the `:logger` and `:error_logger`
implementations. On OTP < 21, the `:error_logger` runs its translators
in a different process, while the `:logger` (on OTP >= 21) runs the
translators in the same process.

This means that taking `self/0` inside the translator produces a
different pid than the one ignored in the test, which fails the test.
This isn't caused by a failure in the implementation, but rather an
issue in the test setup.

This patch uses a static pid (`<0.123.0>`) on OTP 20. This works by
calling out to `pid/0` and `ignore_pid/0`. The former produces the
static PID on OTP 20, but uses `self/0` on any newer version. The latter
either ignores `pid/0` on OTP 20, or calls to `Tracer.ignore/0`, which
ignores the PID returned by `self/0`.

This patch should be reverted when support for OTP 20 (and
`:error_logger`) is dropped.

[skip-changeset]
appsignal/appsignal-elixir,appsignal/appsignal-elixir,appsignal/appsignal-elixir,appsignal/appsignal-elixir