Skip to content

Allow disabling statsd export via constructor arg #778

@tuukkamustonen

Description

@tuukkamustonen

Is your feature request related to a problem? Please describe.

During development (and sometimes in production) we want to disable the statsd metrics export. The docs state:

In development, you can disable any statsd metric collection using DD_DOGSTATSD_DISABLE=True (or any not-empty value).

Two problems:

  • It's not possible to disable the DogStatsd via constructor
  • The docs are not right, code actually checks the value against a set of {"True", "true", "yes", "1"} values (so not any not-empty value)

Describe the solution you'd like

  • Support disable_export (or with better name) in constructor
  • Fix the docs

Describe alternatives you've considered

Could use a dummy statsd client that implements the DogStatsd API. But I'd rather just disable the export, so the logic gets covered.

Or, it might would be useful if the client did log/console output, instead of completely disabling the export.

Additional context

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions