Hi team, we are trying to emit a metric when a job...
# ask-community
h
Hi team, we are trying to emit a metric when a job run is requested (from backfill, playground, or sensor). I am not able to find a good place to inject this code to. (I couldn’t put it inside the job graph as the job may potentially fail even before reaching the first step). Wondering if you have any recommendations please?
🤖 1
d
Hi Hebo - I could imagine using a custom run coordinator for this? https://docs.dagster.io/deployment/run-coordinator#custom-run-coordinators That lets you run code when a run is submitted
like in the example here: https://docs.dagster.io/guides/dagster/run-attribution#custom-run-coordinator ( for submitting a metric instead of adding a header)
h
Oh right! The run coordinator!! Thanks Daniel!