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 #1

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

nickwilliams-eventbrite
Copy link
Contributor

@nickwilliams-eventbrite nickwilliams-eventbrite commented Oct 15, 2019

  • 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

(Since DataDog/uwsgi-dogstatsd#17 is never going to be merged, it appears.)

- 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
```
@jshuping jshuping merged commit 9033133 into master Oct 15, 2019
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.

2 participants