Azolo / websockex

An Elixir Websocket Client
MIT License
520 stars 100 forks source link

Telemetry events #100

Closed pedro-gutierrez closed 3 years ago

pedro-gutierrez commented 3 years ago

This PR adds telemetry to the library. For now, the following basic events are emitted:

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 as async: false.

Fixes #99

obrok commented 3 years ago

@Azolo what would it take to get this merged and released? Anything we can do to help?

Azolo commented 3 years ago

Sorry, been busy thanks for the ping.

This looks great.

I'll merge and try to get a release out soon.

obrok commented 3 years ago

Thanks a bunch!

pedro-gutierrez commented 3 years ago

Hi @Azolo sorry to bother you with this again. Do you have an estimate about when 0.4.4 could be out ? :)