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

Allow overriding graphite metric conversion method #625

Merged
merged 2 commits into from
Nov 24, 2015

Conversation

agile
Copy link

@agile agile commented Nov 21, 2015

I noticed some external verifications of what riemann was sending to graphite were failing due to lost precision of some long metrics because they're being converted into floats. I'm not sure if there's a good reason to use float vs double so I thought to allow overriding the function used to do the conversion.

@aphyr
Copy link
Collaborator

aphyr commented Nov 21, 2015

IIRC the problem here is fractions--Riemann has a rational type, and Graphite doesn't. How about doing an (integer?) check and passing those through unchanged, and coercing other types to (double x)?

@agile agile force-pushed the increase_precision_of_graphite_events branch from 7502d34 to c8b0e07 Compare November 21, 2015 19:03
@agile
Copy link
Author

agile commented Nov 21, 2015

@aphyr sounds sensible to me, updated to do that.

@aphyr
Copy link
Collaborator

aphyr commented Nov 24, 2015

Looks great, thank you!

aphyr added a commit that referenced this pull request Nov 24, 2015
Allow overriding graphite metric conversion method
@aphyr aphyr merged commit 142d4b4 into riemann:master Nov 24, 2015
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