Skip to content

Allow statsd protocol to be configurable#157

Closed
ianbishop wants to merge 1 commit intoenvoyproxy:masterfrom
ianbishop:master
Closed

Allow statsd protocol to be configurable#157
ianbishop wants to merge 1 commit intoenvoyproxy:masterfrom
ianbishop:master

Conversation

@ianbishop
Copy link
Copy Markdown

This capability is already available via lyft/gostats, this just exposes it to be configurable in ratelimit. We require this as we only support UDP statsd for performance reasons.

Signed-off-by: Ian Bishop ibishop@flipboard.com

Signed-off-by: Ian Bishop <ibishop@flipboard.com>
UseStatsd bool `envconfig:"USE_STATSD" default:"true"`
StatsdHost string `envconfig:"STATSD_HOST" default:"localhost"`
StatsdPort int `envconfig:"STATSD_PORT" default:"8125"`
StatsdProtocol string `envconfig:"STATSD_PROTOCOL" default:"tcp"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does setting STATSD_PROTOCOL without making this change not work for you?

(For me it seems to work without this change, just with the declaration in https://github.com/lyft/gostats/blob/f9add79ec5fce9579fb2e52b6b419da2ee965b37/settings.go#L26)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Although even if it works without this, declaring it here might be useful from a documentation / discoverability perspective

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I did try setting STATSD_PROTOCOL and thought that it did not work which led to this PR. I will try it again, I probably made an error.

Copy link
Copy Markdown
Author

@ianbishop ianbishop Jul 9, 2020

Choose a reason for hiding this comment

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

Sorry, the issue seems to be that STATSD_PROTOCOL does not work with the envoyproxy/ratelimit:v1.4.0 container. Building a new container from main works without this change.

Would you like me to close it or leave it for documentation purposes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't have strong options either way, but also I'm not a maintainer so I wouldn't be able to merge regardless

Seems like removing the statsd stuff (host, port, etc.) from settings.go and just linking from the README to whatever documentation exists in the gostats library would require the least amount of ongoing maintenance

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1 can we just move this to the README?

@mattklein123 mattklein123 self-assigned this Jul 13, 2020
@stale
Copy link
Copy Markdown

stale bot commented Jul 25, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Jul 25, 2020
@stale
Copy link
Copy Markdown

stale bot commented Aug 1, 2020

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot closed this Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants