elementary-data / elementary

The dbt-native data observability solution for data & analytics engineers. Monitor your data pipelines in minutes. Available as self-hosted or cloud service with premium features.
https://www.elementary-data.com/
Apache License 2.0
1.89k stars 159 forks source link

[ELE-842] Set a fixed timezone to generated HTML report #838

Open diorge opened 1 year ago

diorge commented 1 year ago

Is your feature request related to a problem? Please describe.

We have a dbt pipeline that works on daily cycles, using UTC timezone. The team is global and the edr report uses the local machine timezone to aggregate the days in the dashboard, creating a discrepancy in the shown data (for those in the American continent, in this case).

Describe the solution you'd like

An optional flag added to edr report ... --timezone UTC that fixes the report timezone, instead of using the reader's local timezone. A similar flag exists for alerts: https://github.com/elementary-data/elementary/pull/305

Describe alternatives you've considered

Currently the team has to change their local timezone (at OS level or browser extension), which is very troublesome.

Additional context

I'm not sure what is the behavior when this is hosted as a static website, but since it's JavaScript I believe it wouldn't change. We still have no infra for that though.

Would you be willing to contribute this feature?

Yes. I was looking through the project to see how easy it is to make this change. Unfortunately it seems the elementary/monitor/data_monitoring/report/index.html is a minified file and the template for generating it is not part of this repository? I couldn't find it.

ELE-842

Maayan-s commented 1 year ago

Thanks for reporting this @diorge! I understand the need here and agree we must be consistent with the results we show across time zones.

@Hadarsagiv @NoyaArie This seems to be an integration issue between BE and FE. We pass all times to FE in UTC, and I think in FE they change to the browser timezone. Let's start with a task to review the time zone in BE and FE of each of the times we show in the report, and define what is the timezone we want to have for each (local/UTC). I assume this is the real load here, and fixing would be pretty fast.