"no function clause" error when calling folsom_vm_metrics:get_system_info()
awesometown opened this issue · comments
I'm getting the error below when calling folsom_vm_metrics:get_system_info() on our servers:
** exception error: no function clause matching
folsom_vm_metrics:'-convert_system_info/1-lc$^1/1-1-'({logical,
0}) (src/folsom_vm_metrics.erl, line 102)
in function folsom_vm_metrics:'-get_system_info/0-lc$^0/1-0-'/1 (src/folsom_vm_metrics.erl, line 52)
in call from folsom_vm_metrics:'-get_system_info/0-lc$^0/1-0-'/1 (src/folsom_vm_metrics.erl, line 52)
The same call works fine on my local machine. I believe the problem is related to what's being returned by erlang:system_info(cpu_topology)
. On my local machine, the value is:
[{processor,{logical,0}},{processor,{logical,1}}]
But on the server it's just:
{logical,0}
All of our servers are hosted Amazon EC2 instances, so I expect that may account for the difference, but I think folsom should be able to account for both cases?
Just to confirm, it's only the tuple {logical, 0} not contained inside a list or anything?
I think this is fixed on HEAD, give it a shot.
Yeah, it was just the tuple, not inside any list. Seems to be fixed in HEAD. Thanks :)
Unfortunately this issue still exists in HEAD.
Please send me your erlang:system_info(cpu_topology) output and I'll merge.