How do i get the number of attempts inside a job during a retry?

If a job fails, using filters I want to get access to the attempt count so I can log it. How do I access that data?

Check this SO answer
or try something like this (maybe it’s about max retry count, not current)
JobStorage.Current.GetConnection().GetJobParameter(jobId, "RetryCount")

Good idea. I’ll try that. Thank you!