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

Long integers in parameters trigger errors in AppSignal NIF #88

Closed
jeroenvisser101 opened this issue Jan 23, 2017 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@jeroenvisser101
Copy link
Contributor

When having long integers inside parameters (in our case, keystrokes typed by a user on a phone) AppSignal's NIF throws a (ArgumentError) argument error.

Backtrace

(elixir) lib/enum.ex:657: anonymous fn/3 in Enum.each/2
(stdlib) lists.erl:1262: :lists.foldl/3
(elixir) lib/enum.ex:656: Enum.each/2
(appsignal) lib/appsignal/utils/data_encoder.ex:16: Appsignal.Utils.DataEncoder.encode/1
(appsignal) lib/appsignal/transaction.ex:209: Appsignal.Transaction.set_sample_data/3
(appsignal) lib/appsignal/transaction.ex:378: Appsignal.Transaction.set_request_metadata/2
(appsignal) lib/appsignal/phoenix/plug.ex:23: anonymous fn/2 in Appsignal.Phoenix.Plug.call/2```
@tombruijn tombruijn added this to the Elixir 1.0 milestone Jan 24, 2017
@tombruijn
Copy link
Member

Hi @jeroenvisser101!

Thanks for reporting (again 😉 ). We've been searching and thinking of a good way to fix this. Right now our idea is to cast the values to string when they are too big, unless we can find of a better/supported way to save these large integer values.

We will try to fix this quickly

@jeroenvisser101
Copy link
Contributor Author

Sounds like a good idea. Is it maybe possible to cast it to a string but then when you pass it into the rust part, it will serialize it to JSON and it converts it back to an integer?

@jeroenvisser101
Copy link
Contributor Author

💯 🎉

jeffkreeftmeijer added a commit that referenced this issue Feb 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants