Skip to content

Improve logging around useSidebarOrderedReports #65928

@mountiny

Description

@mountiny

Coming from here

Problem

Empty LHN issue is hard to reproduce and we lack enough tooling around to detect why it is happening. Currently, app logs some of the dependencies, but not all of them.

Solution

Add logging of LHN previous and current dependencies in useSidebarOrderedReports when reports get empty to find the villain. It can be done because data from useSidebarOrderedReports hook is directly used in LHNOptionsList:

const shouldShowEmptyLHN = data.length === 0;

We can combine this with existing logs (Wohoo log mentioned above) to find what data change is a root cause.
It logs when data goes empty -> non-empty (and vice-versa) as well as on initialization and consist of:

  • compressed deps information
  • keys of deps that have changed
  • processing duration to check if we are not overloading user app
Issue OwnerCurrent Issue Owner: @kacper-mikolajczak

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.MonthlyKSv2ReviewingHas a PR in review

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions