GitHub user dosubot[bot] added a comment to the discussion: Enable Async mode 
and the time that log into logs table is not correct

<!-- Greeting -->
Hey @chathawee! 👋 I'm here to help you with any bugs, questions, or to guide 
you on your journey as a contributor. While you wait for a human maintainer, 
feel free to share more details, and let's get this sorted out together! 🚀

<!-- Answer -->
The issue you're experiencing with incorrect timestamps in the logs after 
enabling async mode in Superset 4.0.1 might be related to time synchronization 
between the WebUI and the backend logging system. Superset recommends 
configuring both the database engine and the Superset backend to use the same 
timezone, preferably UTC, to ensure consistency in timestamps across different 
components 
<sup>[[1]](https://github.com/apache/superset/blob/master/docs/docs/configuration/timezones.mdx)</sup>.

Additionally, the logging of async events involves the `DBEventLogger` class, 
which commits logs to the Superset database, specifically the `Log` table. The 
`AsyncQueryManager` class handles async events and logs them to Redis streams, 
which might also affect how timestamps are recorded 
<sup>[[2]](https://github.com/apache/superset/blob/master/superset/utils/log.py)</sup><sup>[[3]](https://github.com/apache/superset/blob/master/superset/async_events/async_query_manager.py)</sup>.

To address the discrepancy, ensure that your system's timezone settings are 
consistent across all components involved in logging. If the issue persists, 
you might want to investigate further into how timestamps are being generated 
and logged in your specific setup.


<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*

---
<sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/b6aa275a-757c-4c22-80f7-dfcd0240065e?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/b6aa275a-757c-4c22-80f7-dfcd0240065e?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/b6aa275a-757c-4c22-80f7-dfcd0240065e?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/b6aa275a-757c-4c22-80f7-dfcd0240065e?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/b6aa275a-757c-4c22-80f7-dfcd0240065e?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/b6aa275a-757c-4c22-80f7-dfcd0240065e?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b6aa275a-757c-4c22-80f7-dfcd0240065e?feedback_type=other)</sup>


GitHub link: 
https://github.com/apache/superset/discussions/33466#discussioncomment-13168675

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to