coinbase / coinbase/temporal-ruby
Injecting the metrics and log adapter into the Worker object
- Dominant language
- Ruby
- Stars
- 287
- Forks
- 113
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 1
Description
Hi there,
At the moment, some of the usages of the log and metrics adapters reference the global variables `Temporal.log` and `Temporal.metrics` respectively. This means that the configuration can't be overridden by passing different adapters in the configuration into the `Worker` constructor.
Example: https://github.com/coinbase/temporal-ruby/blob/101ec13947a0c2c9bc1754de87aeaf7c697fb54f/lib/temporal/activity/task_processor.rb#L28-L29
I've noticed that there are more and more things are starting to be injected via the `Worker`. Is doing the same thing with these adapters possible? Would you accept a change which added that?
Thanks!
Contributor guide
Assessment
This issue has not been assessed yet.