Uninitialized constant error (ruby-kafka) w/ v4.7.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- observability-sre
Research direction
Start by reading ruby-kafka/lib/kafka/datadog.rb around lines 80-85, especially default_host and default_port, and compare the referenced Datadog::Statsd constants in the reported v4.7.0 release. Reproduce with ruby-kafka 0.7.1 or 0.7.10 and confirm that the uninitialized-constant error no longer occurs.
Written by the indexing model from the issue text.
Description
Hi, following the release of v4.7.0, an error results when using ruby-kafka v0.7.1
"uninitialized constant Datadog::Statsd::Connection::DEFAULT_PORT\nDid you mean? Datadog::Statsd::DEFAULT_BUFFER_SIZE"
ruby-kafka/lib/kafka/datadog.rb: line 80
def default_host
::Datadog::Statsd.const_defined?(:Connection) ? ::Datadog::Statsd::Connection::DEFAULT_HOST : ::Datadog::Statsd::DEFAULT_HOST
end
Following is the listener error backtrace
[2020-02-17T20:05:44:328+0000Z] ERROR -- Phobos : {:message=>"Listener crashed, waiting 16.14s (uninitialized constant Datadog::Statsd::Connection::DEFAULT_PORT\nDid you mean? Datadog::Statsd::DEFAULT_BUFFER_SIZE)", :listener_id=>"51366e", :retry_count=>4, :waiting_time=>16.14, :exception_class=>"NameError", :exception_message=>"uninitialized constant Datadog::Statsd::Connection::DEFAULT_PORT\nDid you mean? Datadog::Statsd::DEFAULT_BUFFER_SIZE", :backtrace=>["/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/datadog.rb:85:in default_port'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/datadog.rb:52:in port'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/datadog.rb:34:in statsd'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/datadog.rb:106:in emit'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/datadog.rb:99:in block (2 levels) in <class:StatsdSubscriber>'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/datadog.rb:124:in request'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/subscriber.rb:145:in finish'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications/fanout.rb:160:in finish'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications/fanout.rb:62:in block in finish'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications/fanout.rb:62:in each'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications/fanout.rb:62:in finish'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications/instrumenter.rb:45:in finish_with_state'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications/instrumenter.rb:30:in instrument'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications.rb:180:in instrument'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/instrumenter.rb:21:in instrument'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/connection.rb:97:in send_request'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/broker.rb:200:in send_request'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/broker.rb:44:in fetch_metadata'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/cluster.rb:375:in block in fetch_cluster_info'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/cluster.rb:370:in each'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/cluster.rb:370:in fetch_cluster_info'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/cluster.rb:350:in cluster_info'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/cluster.rb:98:in refresh_metadata!'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/cluster.rb:52:in add_target_topics'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/consumer_group.rb:27:in subscribe'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/consumer.rb:575:in subscribe_to_topic'", "/usr/local/bundle/gems/ruby-kafka-0.7.10/lib/kafka/consumer.rb:105:in subscribe'", "/usr/local/bundle/gems/phobos-1.8.2/lib/phobos/listener.rb:96:in block in start_listener'", "/usr/local/bundle/gems/phobos-1.8.2/lib/phobos/instrumentation.rb:21:in block in instrument'", "/usr/local/bundle/gems/activesupport-6.0.2.1/lib/active_support/notifications.rb:182:in instrument'", "/usr/local/bundle/gems/phobos-1.8.2/lib/phobos/instrumentation.rb:20:in instrument'", "/usr/local/bundle/gems/phobos-1.8.2/lib/phobos/listener.rb:94:in start_listener'", "/usr/local/bundle/gems/phobos-1.8.2/lib/phobos/listener.rb:46:in start'", "/usr/local/bundle/gems/phobos-1.8.2/lib/phobos/executor.rb:72:in run_listener'", "/usr/local/bundle/gems/phobos-1.8.2/lib/phobos/executor.rb:31:in block (2 levels) in start'", "/usr/local/bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:353:in run_task'", "/usr/local/bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:342:in block (3 levels) in create_worker'", "/usr/local/bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:325:in loop'", "/usr/local/bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:325:in block (2 levels) in create_worker'", "/usr/local/bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:324:in catch'", "/usr/local/bundle/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:324:in block in create_worker'", "/usr/local/bundle/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in block in create_with_logging_context'"]}
Thank you
- Dominant language
- Ruby
- Stars
- 208
- Forks
- 138
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataDog/dogstatsd-ruby
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DataDog/dogstatsd-ruby#326 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
DataDog/dogstatsd-ruby#321 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
DataDog/dogstatsd-ruby#331 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
DataDog/dogstatsd-ruby#325 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
DataDog/dogstatsd-ruby#324 · 2 reactions ·
All issues in DataDog/dogstatsd-ruby
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
betagouv/conseillers-entreprises#4720 ·
Maintainers usually reply within 3 days
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
zerocracy/judges-action#2692 · 1 comment ·
Maintainers usually reply within 6 days
-
agent:triaged bug bughunt pm:bundler priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
SocketDev/socket-patch#896 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
eurosky-social/eu-haul#32 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
simp/pupmod-simp-auditd#293 ·