Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align with stock statsd plugin, add extra tags, add metric whitelisting #17

Merged
merged 1 commit into from
Nov 6, 2019

Conversation

nickwilliams-eventbrite
Copy link
Contributor

  • After this plugin was created, the stock statsd plugin in the uWSGI repo was updated to support disabling worker metrics and forcing all metrics to be gauges. The first change this commit makes is to port those two changes into this plugin.
  • We only use 3-4 metrics of the dozens that uWSGI records. I've added a whitelisting feature that enables us to filter out undesired metrics, reducing our use of Datadog custom metrics.
  • We need the ability to specify additional tags, so that we can more easily graph uWSGI metrics belonging to specific applications (or group uWSGI metrics by application). I've added that capability here.

This change is completely backwards compatible. If a user has a config such as the following, the plugin behavior will continue in the exact same manner as before this change:

stats-push=dogstatsd:localhost:8135,uwsgi

Now, however, we can add more advanced configuration options, like below, to alter the plugin behavior:

stats-push=dogstatsd:localhost:8135,uwsgi
dogstatsd-extra-tags=app:foo_service
dogstatsd-no-workers=true
dogstatsd-whitelist-metric=core.busy_workers
dogstatsd-whitelist-metric=core.idle_workers
dogstatsd-whitelist-metric=core.overloaded
dogstatsd-whitelist-metric=socket.listen_queue

- After this plugin was created, the stock statsd plugin in the uWSGI repo was updated to support disabling worker metrics and forcing all metrics to be gauges. The first change this commit makes is to port those two changes into this plugin.
- We only use 3-4 metrics of the dozens that uWSGI records. I've added a whitelisting feature that enables us to filter out undesired metrics, reducing our use of Datadog custom metrics.
- We need the ability to specify additional tags, so that we can more easily graph uWSGI metrics belonging to specific applications (or group uWSGI metrics by application). I've added that capability here.

This change is completely backwards compatible. If a user has a config such as the following, the plugin behavior will continue in the exact same manner as before this change:

```
stats-push=dogstatsd:localhost:8135,uwsgi
```

Now, however, we can add more advanced configuration options, like below, to alter the plugin behavior:

```
stats-push=dogstatsd:localhost:8135,uwsgi
dogstatsd-extra-tags=app:foo_service
dogstatsd-no-workers=true
dogstatsd-whitelist-metric=core.busy_workers
dogstatsd-whitelist-metric=core.idle_workers
dogstatsd-whitelist-metric=core.overloaded
dogstatsd-whitelist-metric=socket.listen_queue
```
@nickwilliams-eventbrite
Copy link
Contributor Author

Bump :-)

@jshuping
Copy link

jshuping commented Aug 5, 2019

Almost 3 months have gone by... any feedback?

@mattrobenolt
Copy link

We have started using your fork as well. Haven't had any issues. 🎉

Copy link
Contributor

@remeh remeh left a comment

Choose a reason for hiding this comment

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

Hey @nickwilliams-eventbrite
Sorry for the late reply. First, thanks for your contribution 🙇
I had the chance to review and test your PR and it works well! I've caught a small typo in the doc of one of the new field you've added, could I ask you to fix it before we proceed to merge your PR? Thank you!

stats-push = dogstatsd:127.0.0.1:8125,myapp
dogstatsd-extra-tags = app:foo_service,instance:1
dogstatsd-no-workers = true
dogstatsd-all_gauges = true
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it should be dogstatsd-all-gauges here.

@remeh remeh merged commit 1455da2 into DataDog:master Nov 6, 2019
@remeh
Copy link
Contributor

remeh commented Nov 6, 2019

Hello @nickwilliams-eventbrite
I'm moving forward and I'll merge your PR (I'll fix the typo in master). Once again, thank you for your contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants