Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Support configurable sampling rate for datadog #9

Merged
merged 3 commits into from
May 23, 2019
Merged

Conversation

fpacifici
Copy link
Contributor

Add configuration paramters for sampling rate.
Since "message written" is orders of magnitude bigger than task execution I added two separate sampling rates so we can still get good signal from task executions.

This required some refactoring of the stats api we use since producer.py does not have access to the configuration. This new structure also allows us to provide a dummy Stats object to the producer for those that do not have datadog up and running.

@fpacifici
Copy link
Contributor Author

cc @JTCunning. This adds two parameters to the config file

Copy link
Contributor

@tkaemming tkaemming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the Stats abstraction. I do think it will make sense to continue decoupling it further from Datadog in the future. No hurry to do that right now though.

"properties": {
"host": {"type": "string"},
"port": {"type": "integer"},
"msg_sampling_rate": {"type": "number"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably change these to "message" since we've used that rather than "msg" pretty consistently, including in other configurations like the commit_positions_after_flushed_messages Source backend configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@fpacifici fpacifici merged commit d750589 into master May 23, 2019
@tkaemming tkaemming deleted the fix_pgerror branch July 3, 2019 18:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants