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

FrozenError from Redis patcher #initialize #2369

Closed
KJTsanaktsidis opened this issue Nov 16, 2022 · 3 comments
Closed

FrozenError from Redis patcher #initialize #2369

KJTsanaktsidis opened this issue Nov 16, 2022 · 3 comments
Assignees
Labels
bug Involves a bug community Was opened by a community member
Milestone

Comments

@KJTsanaktsidis
Copy link

Current behaviour
When instantiating a Redis client using the current master branch of dd-trace-rb, and passing in a frozen options hash, an exception is raised:

FrozenError: can't modify frozen Hash: {:url=>"redis://localhost:6379", :timeout=>1.0}
    /home/runner/vendor/bundle-52/ruby/2.7.0/bundler/gems/dd-trace-rb-f387e1747a44/lib/datadog/tracing/contrib/redis/patcher.rb:24:in `initialize'

Expected behaviour
It should not raise an exception :) This was broken a few days ago in #2363 I believe

Steps to reproduce

Redis.new({}.freeze) should do it I think?

How does ddtrace help you?

It rocks! Really looking forward to rolling out the new native profiler implementation.

Environment

  • **ddtrace version: Git master, ref f387e1747a44 **
  • Configuration block doubt this is relevant?:
  • Ruby version: 2.7.6
  • Operating system: Ubuntu 18.04
  • Relevant library versions: N/A
@KJTsanaktsidis KJTsanaktsidis added bug Involves a bug community Was opened by a community member labels Nov 16, 2022
@zenspider
Copy link

@TonyCTHsu
Copy link
Contributor

@KJTsanaktsidis @zenspider Thanks for reporting! Yeah it seems like the current code does not handle a frozen input. Will fix!

@TonyCTHsu
Copy link
Contributor

@KJTsanaktsidis 👋 I just released 1.6.1, this would fix the frozen input. Will be working on redis 5 instrumentation next!

@TonyCTHsu TonyCTHsu added this to the 1.6.1 milestone Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug community Was opened by a community member
Projects
None yet
Development

No branches or pull requests

3 participants