Skip to content

ArithmeticError: bad argument in arithmetic expression #519

@tomtaylor

Description

@tomtaylor

Describe the bug

We see occasional alerts with the following stack trace:

ArithmeticError: bad argument in arithmetic expression
  Module "erlang", in :erlang.*/2
  File "lib/new_relic/harvest/collector/metric/harvester.ex", line 158, in NewRelic.Harvest.Collector.Metric.Harvester.merge_metric/2
  File "lib/enum.ex", line 2546, in Enum."-reduce/3-lists^foldl/2-0-"/3
  File "lib/new_relic/harvest/collector/metric/harvester.ex", line 49, in NewRelic.Harvest.Collector.Metric.Harvester.handle_cast/2
  File "gen_server.erl", line 2371, in :gen_server.try_handle_cast/3
  File "gen_server.erl", line 2433, in :gen_server.handle_msg/6
  File "proc_lib.erl", line 329, in :proc_lib.init_p_do_apply/3

In this case, the arguments were {:error, :timeout} and 10000.

This has happened 12 times in the last 90 days.

Environment

  • Elixir & Erlang version (elixir -v): 1.18.2
  • Agent version (mix deps | grep new_relic_agent): 1.34.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions