buildflow
buildflow copied to clipboard
Metrics need to be injected as a dependency to work.
Describe the bug If you use ray metrics inside of a processor the metrics do not get properly exported. I think this is cause ray deregisters metrics when they get garbage collected.
The current workaround is to inject the metric into a replica dependency to avoid it being garbage collected.
Probably the best work around is to make buildflow metrics keep a reference to the metric around, this would allow them to be properly exported.
To Reproduce Steps to reproduce the behavior:
- define a metric inside your processor or as a global metric
- increment the metric inside your process
- observe it not being reported
Expected behavior I would expect the metric to be exported