1 Matching Annotations
  1. Feb 2021
    1. STATSD_SAMPLE_RATE: (default: 1.0)

      It's recommended to configure this library by setting environment variables.

      The thing I don't like about configuration via environment variables is that everything is limited/reduced to the string type. You can't even use simple numeric types, let alone nice rich value objects like you could if configuration were done in the native language (Ruby).

      If you try to, you get:

      ENV['STATSD_SAMPLE_RATE'] = 1
      config/initializers/statsd.rb:8:in `[]=': no implicit conversion of Integer into String (TypeError)