Skip to content

stats: DogStatsd sink supports custom metric name prefix#4506

Merged
mattklein123 merged 4 commits intoenvoyproxy:masterfrom
taiki45:dogstatsd-sink-supports-prefix
Oct 3, 2018
Merged

stats: DogStatsd sink supports custom metric name prefix#4506
mattklein123 merged 4 commits intoenvoyproxy:masterfrom
taiki45:dogstatsd-sink-supports-prefix

Conversation

@taiki45
Copy link
Member

@taiki45 taiki45 commented Sep 23, 2018

Description:

DogStatsd sink supports custom global metric name prefix like StatsdSink does.

Fixes #4390

Risk Level: Low, small optional feature.
Testing: Automated tests passed locally. Manually tested with statsd_exporter and Prometheus.
Docs Changes: Included.
Release Notes: Included.

ref: envoyproxy#4390

Signed-off-by: Taiki Ono <taiki-ono@cookpad.com>
@junr03
Copy link
Member

junr03 commented Sep 24, 2018

@mrice32 do you mind taking a first pass?

mrice32
mrice32 previously approved these changes Sep 25, 2018
Copy link
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

This looks awesome! LGTM. One thing I did notice is that as far as I can tell, we don't have any tests that verify that the UDP or TCP sinks add the configured prefix to the metric names that they output. That is somewhat orthogonal to this PR since the statsd prefix feature was preexisting, but just wanted to point it out.

Copy link
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

Sorry, I missed one nit.


reserved 2;

// Optional custom metric name prefix the same as :ref:`StatsdSink's prefix field
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe rephrase to something like:

// Optional custom metric name prefix. See 
// :ref:`StatsdSink's prefix field <envoy_api_field_config.metrics.v2.StatsdSink.prefix>`
// for more details.

Copy link
Member

Choose a reason for hiding this comment

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

Reminder to fix this nit :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, I though I fixed it... I'll fix it now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, now I fixed this.

@taiki45
Copy link
Member Author

taiki45 commented Sep 25, 2018

Right, I agree we should have tests in that area. I'll try adding them in this PR.

@stale
Copy link

stale bot commented Oct 2, 2018

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 stalebot believes this issue/PR has not been touched recently label Oct 2, 2018
Signed-off-by: Taiki Ono <taiki-ono@cookpad.com>
@stale stale bot removed the stale stalebot believes this issue/PR has not been touched recently label Oct 2, 2018
@taiki45
Copy link
Member Author

taiki45 commented Oct 2, 2018

Sorry for being late. I added some tests for custom metric prefix.

@mattklein123
Copy link
Member

@taiki45 can you merge master to bring in the bazel build cache fix and also fix merge conflicts? I can look after that.

@mattklein123 mattklein123 self-assigned this Oct 2, 2018
@taiki45
Copy link
Member Author

taiki45 commented Oct 3, 2018

@mattklein123 Thanks, I merged master and it seems the merge resolved conflicts automarically.

Copy link
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

LGTM outside of that one nit above. Thanks for adding those new tests - this is awesome!


reserved 2;

// Optional custom metric name prefix the same as :ref:`StatsdSink's prefix field
Copy link
Member

Choose a reason for hiding this comment

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

Reminder to fix this nit :)

Signed-off-by: Taiki Ono <taiki-ono@cookpad.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thank you!

@mattklein123 mattklein123 merged commit bdb2859 into envoyproxy:master Oct 3, 2018
@taiki45 taiki45 deleted the dogstatsd-sink-supports-prefix branch October 3, 2018 05:13
aa-stripe pushed a commit to aa-stripe/envoy that referenced this pull request Oct 11, 2018
…4506)

ref: envoyproxy#4390

Signed-off-by: Taiki Ono <taiki-ono@cookpad.com>
Signed-off-by: Aaltan Ahmad <aa@stripe.com>
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.

DogStatsdSink to support Prefixes

4 participants