-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Breakdown Top dependencies API #211441
base: main
Are you sure you want to change the base?
[APM] Breakdown Top dependencies API #211441
Conversation
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
…/kibana into dependencies-api-breakdown
...ation/deployment_agnostic/apis/observability/apm/service_overview/dependencies/index.spec.ts
Outdated
Show resolved
Hide resolved
@@ -27,6 +31,7 @@ export function DependenciesInventoryTable() { | |||
} = useApmParams('/dependencies/inventory'); | |||
const { onPageReady } = usePerformanceContext(); | |||
const { start, end } = useTimeRange({ rangeFrom, rangeTo }); | |||
const [renderedItems, setRenderedItems] = useState<FormattedSpanMetricGroup[]>([]); |
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.
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.
This happens on all pages, and that's because the use_fetcher depends on the timeRangeId
, which is updated every time the refresh
button is clicked, invalidating all functions.
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.
Yeah, but looks like, in this case, we are making an unnecessary request to statistics
aren't we? I.e: it's fetching data for dependencies that will be replaced once top_dependencies
responds. And once it responds, statistics
will be called again for the actual dependencies it needs to fetch data for.
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.
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.
🤔 . That's not what I'm seeing
top_dep.mov
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.
😲
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 tested pointing to another cluster, same as yours, and the extra call happened here too. Let me take a look.
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.
Alright, I made some changes, I mainly removed the renderedItems
, we'll need to close look into it to make sure it works as it should. I also add a new option on the userFetcher to not invalidate the dependencies when the refresh button is clicked.
...solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts
Show resolved
Hide resolved
…lity/apm/service_overview/dependencies/index.spec.ts Co-authored-by: Carlos Crespo <[email protected]>
The Screen.Recording.2025-02-25.at.16.55.35.mov |
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.
A lot of work done here 👏
I found one issue described in the earlier comment and one typo.
...ck/solutions/observability/plugins/apm/public/components/shared/dependencies_table/index.tsx
Outdated
Show resolved
Hide resolved
I missed to put the comparison and offset back on the deps... thanks for that. |
…hared/dependencies_table/index.tsx Co-authored-by: Milosz Marcinkowski <[email protected]>
💚 Build Succeeded
Metrics [docs]Async chunks
Public APIs missing exports
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
|
) | ||
.slice(page * pageSize, (page + 1) * pageSize) | ||
.map(({ name }) => name) | ||
.sort() |
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.
Do we need to sort the list for a second time?
closes #210552
Before:
After:
Created a new API:
POST /internal/apm/dependencies/top_dependencies/statistics
to fetch the statistics for the visible dependencies.