Closed pedro-gutierrez closed 3 years ago
@Azolo what would it take to get this merged and released? Anything we can do to help?
Sorry, been busy thanks for the ping.
This looks great.
I'll merge and try to get a release out soon.
Thanks a bunch!
Hi @Azolo sorry to bother you with this again. Do you have an estimate about when 0.4.4 could be out ? :)
This PR adds telemetry to the library. For now, the following basic events are emitted:
[:websockex, :connected]
[:websockex, :disconnected]
[:websockex, :frame, :received]
[:websockex, :frame, :sent]
[:websockex, :terminate]
The Telemetry library only compiles on OTP 21 and later. Given that the CI of this project also supports older releases, this dependency is then conditionally enabled, at the cost of a slightly more complex mix.exs file. The decision about whether or not to call :telemetry is done at compile time, in order to minimise performance overhead. Maybe there is a more elegant way to accomplish this?
All telemetry tests are kept in a separate test file. I needed to reuse the TestClient module, so I took the liberty to move into its own module, in the
test/support
folder. Also, in order to avoid side effects between telemetry tests, I marked them asasync: false
.Fixes #99