Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Settings struct {
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?

RuntimePath string `envconfig:"RUNTIME_ROOT" default:"/srv/runtime_data/current"`
RuntimeSubdirectory string `envconfig:"RUNTIME_SUBDIRECTORY"`
RuntimeIgnoreDotFiles bool `envconfig:"RUNTIME_IGNOREDOTFILES" default:"false"`
Expand Down