-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging middleware doesn't give support for enqueueing logs #473
Comments
Have you tried compile time purging? It's hard to make everyone agree on what should be the correct log level. From my perspective, the above info is quite useful for debugging, so don't think we can disable it by default
I would prefer a telemetry event for these cases if necessary. after_failed hook actually exposes most of the info. Let me know what info is missing there |
Thank you for the rapid response. I agree in general, my point was that whether that is debug or info level is application dependent. Agree the telemetry approach is better than another middleware stage, but don't see how to use the current telemetry or middleware for this, since theoretically the retry could be enqueued but then |
I meant, a new telemetry event could be added if the after_failed is not suitable for your case. Let me know what information you want to log
after_failed will be called after any job failure. Exq.Redis.JobQueue.dead?/1 can be used to figure out whether the job is dead (which means no further retry) or not. Though, some info like when it is scheduled (offset seconds) might not be available at the middleware level. If you mean, after logging it could fail, I think it's hard to handle those kind of cases :), since the log is going to stdout and enqueue is going to redis and I don't think we can make then atomic :)
agree, don't see any good solution other than configuring log_level for each case, which is quite cumbersome. |
Sorry for the delay. My preference would be a new telemetry event.
A telemetry event feels much more correct for this case and for |
It might be nice if there was metadata available in the |
Logs for enqueuing retries are logged at info level.
For one application we'd prefer they be at debug level and with a different format that includes more information. Would adding an
after_enqueued
hook be an appropriate addition to the middleware behavior? Or is a lighter weight approach preferred?The text was updated successfully, but these errors were encountered: