flipp-oss / deimos

Framework to work with Kafka, Avro and ActiveRecord
Other
59 stars 22 forks source link

Fix NameError when using Datadog Metrics #140

Closed iMacTia closed 2 years ago

iMacTia commented 2 years ago

Pull Request Template

Description

Due to namespace clashing, Deimos::Metrics::Datadog is currently raising uninitialized constant Deimos::Metrics::Datadog::Statsd (NameError) when used. This can easily be fixed by adding a ::prefix to Datadog::Statsd.

Type of change

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The issue could be easily reproduced by using the Datadog Metrics adapter in our app. Deimos configuration:

Deimos.configure do
  metrics Deimos::Metrics::Datadog.new(...)
end

Checklist:

dorner commented 2 years ago

LOL good catch! We actually use a vendored / namespaced version of this and we'd never used it directly. :D

iMacTia commented 2 years ago

Ah that explains why, I was really surprised when I saw the error 😄 !