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

Optional automatic truncation of events that exceed the message length limit #22

Merged
merged 1 commit into from
Oct 23, 2015

Conversation

daniel-chambers
Copy link
Contributor

We'd like metrics not to crash the application if the message happens to stray too long, preferring quiet truncation rather than exception throwing.

I've made the default behaviour retain the exception throwing, for backwards compat, but you can opt into truncation with an optional argument.

This should fix #16 too.

@remh
Copy link
Contributor

remh commented Oct 16, 2015

Thanks a lot @daniel-chambers . We'll review this soon.

@truthbk
Copy link
Member

truthbk commented Oct 23, 2015

Looks good! Thanks @daniel-chambers, merging this one. Thanks for keeping backwards compatibility!

truthbk added a commit that referenced this pull request Oct 23, 2015
Optional automatic truncation of events that exceed the message length limit
@truthbk truthbk merged commit d84fa68 into DataDog:master Oct 23, 2015
@anthonychu
Copy link
Contributor

This is great. Thanks @daniel-chambers!

@daniel-chambers
Copy link
Contributor Author

My pleasure. Thanks for merging it!

@daniel-chambers
Copy link
Contributor Author

Is it possible to get this out in a new NuGet package version?

@truthbk
Copy link
Member

truthbk commented Oct 30, 2015

@daniel-chambers we will definitely do that soon! :) Apologies for the slow response!

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.

Statsd.Event.GetCommand() throws when payload is too large
4 participants