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

DataEncoder encodes bignums as strings #123

Merged
merged 1 commit into from
Feb 10, 2017
Merged

DataEncoder encodes bignums as strings #123

merged 1 commit into from
Feb 10, 2017

Conversation

jeffkreeftmeijer
Copy link
Member

Closes #88.

@@ -31,6 +31,9 @@ defmodule Appsignal.Utils.DataEncoder do
def encode(resource, {key, value}) when is_binary(value) do
Nif.data_set_string(resource, key, value)
end
def encode(resource, {key, value}) when is_integer(value) and value >= 9223372036854775808 do
Nif.data_set_string(resource, key, "bignum:#{value}")
Copy link
Member

Choose a reason for hiding this comment

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

I used bigint: in the ruby gem: appsignal/appsignal-ruby#234
probably a good idea to give them the same prefix.

Copy link
Member Author

Choose a reason for hiding this comment

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

Haha, yes, that's what I meant. Fixed in b34b686. 👍

@jeffkreeftmeijer jeffkreeftmeijer merged commit c79904e into develop Feb 10, 2017
@tombruijn tombruijn deleted the bignum branch February 10, 2017 16:53
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