Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure to pass reconnection with sync_connect #239

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

zbarnes757
Copy link
Contributor

We are using the sync_connect option for our redis connection. This causes our telemetry handler to always error and detach. Error:

Handler "redix-default-telemetry-handler" has failed and has been detached. Class=:error
Reason={:case_clause,
 {:connection,
  %{
    address: [REDACTED],
    connection: #PID<0.535.0>,
    connection_name: :primary
  }}}
Stacktrace=[
  {Redix.Telemetry, :handle_event, 4,
   [file: 'lib/redix/telemetry.ex', line: 148]},
  {:telemetry, :"-execute/3-fun-0-", 4,
   [file: '/opt/app/deps/telemetry/src/telemetry.erl', line: 160]},
  {:lists, :foreach, 2, [file: 'lists.erl', line: 1342]},
  {Redix.Connection, :init, 1, [file: 'lib/redix/connection.ex', line: 143]},
  {:gen_statem, :init_it, 6, [file: 'gen_statem.erl', line: 802]},
  {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}
]

It seems like the :telemetry.execute inside the init callback is not passing the reconnection key and therefore is always crashing the handler.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 940fddb1be09ae42c0e5f0fe0c5d549ccdbed2e4-PR-239

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.694%

Totals Coverage Status
Change from base Build 81a2e85275c0139ceaa4547ca9e3c0d46db1742f: 0.0%
Covered Lines: 599
Relevant Lines: 699

💛 - Coveralls

@whatyouhide whatyouhide merged commit 28dbe3a into whatyouhide:main Dec 12, 2022
@whatyouhide
Copy link
Owner

Great catch, thanks @zbarnes757! 💟

@zbarnes757
Copy link
Contributor Author

Thanks for reviewing so fast, @whatyouhide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants