```ruby
if Rails.env.production?
  require 'datadog/statsd'

  module GitHubClassroom
    def self.statsd
      @statd ||= ::Datadog::Statsd.new('localhost', 8125)
    end
  end
end
```

Create stub Statsd object so non prod environments don't error
user
```ruby
require 'datadog/statsd'

class StubStatsd
  def increment; end
end

module GitHubClassroom
  def self.statsd
    if Rails.env.production?
      @statsd ||= ::Datadog::Statsd.new('localhost', 8125)
    else
      @stats ||= ::StubStatsd.new
    end
  end
end
```
assistant