-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(insights): Simplify SpanTimeCharts
#81931
ref(insights): Simplify SpanTimeCharts
#81931
Conversation
That hasn't been used in a very long time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! just some nits
if (extraQuery) { | ||
eventView.query += ` ${extraQuery.join(' ')}`; | ||
} | ||
|
||
const {isPending} = useSpansQuery({ | ||
eventView, | ||
initialData: [], | ||
referrer: 'api.starfish.span-time-charts', | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we use useSpanMetrics
here, or I suppose longterm it will be a dashboard diget?
We're not doing this because of the following comment you made right?
There's still old data loading, and other issues, but one thing at a time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep!
const {isPending} = useSpansQuery({ | ||
eventView, | ||
initialData: [], | ||
referrer: 'api.starfish.span-time-charts', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
referrer: 'api.starfish.span-time-charts', | |
referrer: 'api.performance.resources.span-time-charts', |
^ Also applies to other referrers in this file
Additionally, I think ideally this comes from a referrers.ts
file as the other modules do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update that in a follow-up! 👍🏻
We did not finish this project. The UI code is removed in #81931
SpanTimeCharts
is a very old component with a lot of issues, since it uses all kinds of old hooks for fetching, and have a lot of dead code.Importantly, it's only used in one place! The Resources landing page. This PR renames it, moves it, and removes any code that isn't needed for that page.
There's still old data loading, and other issues, but one thing at a time.