Error when calling MFA defined by measurement: 'Elixir.PromEx.Plugins.Oban' execute_queue_metrics [#{map =>
Open
Nobody has claimed this yet.
bug
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
If you start the application and promex is enabled, you get this error.
To replicate locally, turn on these envs:
# PROMEX_ENABLED=true
# PROMEX_EXPENSIVE_METRICS_ENABLED=true
# PROMEX_METRICS_ENDPOINT_AUTHORIZATION_REQUIRED=no
Sentry Issue: LIGHTNING-ZW
Error when calling MFA defined by measurement: 'Elixir.PromEx.Plugins.Oban' execute_queue_metrics [#{map =>
#{'Elixir.Lightning.Oban' =>
[]},
'__struct__' =>
'Elixir.MapSet'}]
Class=error
Reason=#{message =>
<<"No Oban instance named `Oban` is running and config isn't available.\n">>,
'__struct__' => 'Elixir.RuntimeError','__exception__' => true}
Stacktrace=[{'Elixir.Oban.Registry',config,1,
[{file,"lib/oban/registry.ex"},{line,37}]},
{'Elixir.PromEx.Plugins.Oban',
include_zeros_for_missing_queue_states,1,
[{file,"lib/prom_ex/plugins/oban.ex"},{line,452}]},
{'Elixir.PromEx.Plugins.Oban',handle_oban_queue_polling_metrics,
2,
[{file,"lib/prom_ex/plugins/oban.ex"},{line,441}]},
{'Elixir.Enum','-each/2-fun-0-',3,
[{file,"lib/enum.ex"},{line,992}]},
{'Elixir.Enum','-each/2-anonymous-3-',3,
[{file,"lib/enum.ex"},{line,4515}]},
{'Elixir.Enumerable.List',reduce,3,
[{file,"lib/enum.ex"},{line,4968}]},
{'Elixir.Enum',each,2,[{file,"lib/enum.ex"},{line,4515}]},
{telemetry_poller,make_measurement,1,
[{file,"/app/deps/telemetry_poller/src/telemetry_poller.erl"},
{line,474}]}]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported environment flags and the stack trace in lib/prom_ex/plugins/oban.ex, especially include_zeros_for_missing_queue_states/1 around line 452 and execute_queue_metrics. Reproduce with PromEx and the expensive metrics enabled, then confirm the Oban queue metrics no longer raise the missing-instance configuration error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100