Summary
Decouple TransactionsTable from APM-specific context so it can be reused in the Service flyout and eventually support both processed and unprocessed OTel data.
The two current blockers are useApmServiceContext() (for serviceName, transactionType, etc.) and useAnyOfApmParams() (for latencyAggregationType, comparisonEnabled, offset, etc. ). Both need to become explicit props so the component can be used outside APM's routing and context tree.
The component should be moved to a shared package.
Scope
- Thread
serviceName, transactionType, start, end, environment, latencyAggregationType (and any other needed data) as explicit props, removing context and URL dependencies
- Move the component to a shared package, usable from both APM and the Service flyout
- The component receives
items, isLoading, and a onSearchQueryChange callback as props — no API calls inside. Each consumer owns its own data fetching hook and passes the result down, so processed APM and unprocessed OTel can use different APIs without forking the component (TBD)
- Row click behaviour comes in via
getRowHref or onRowClick, the parent decides whether that means navigating to a page, opening a flyout, or plain text (unprocessed). (TBD)
- Add click EBT props so each consumer can pass its own element constant without the table hardcoding APM context
Migrate existing APM usage to the shared component via a thin adapter that reads from context/URL as today, no behaviour change for APM users, no two diverging implementations
Exploration required
Evaluate whether ManagedTable should be carried into the shared package or replaced with a more generic EUI component. The table needs to support server-side search (re-fetch on query change, to handle maxCountExceeded), so EuiInMemoryTable is likely not suitable. Document the decision and rationale as part of this issue.
Summary
Decouple
TransactionsTablefrom APM-specific context so it can be reused in the Service flyout and eventually support both processed and unprocessed OTel data.The two current blockers are
useApmServiceContext()(forserviceName,transactionType, etc.) anduseAnyOfApmParams()(forlatencyAggregationType,comparisonEnabled,offset, etc. ). Both need to become explicit props so the component can be used outside APM's routing and context tree.The component should be moved to a shared package.
Scope
serviceName,transactionType,start,end,environment,latencyAggregationType(and any other needed data) as explicit props, removing context and URL dependenciesitems,isLoading, and aonSearchQueryChangecallback as props — no API calls inside. Each consumer owns its own data fetching hook and passes the result down, so processed APM and unprocessed OTel can use different APIs without forking the component (TBD)getRowHreforonRowClick, the parent decides whether that means navigating to a page, opening a flyout, or plain text (unprocessed). (TBD)Migrate existing APM usage to the shared component via a thin adapter that reads from context/URL as today, no behaviour change for APM users, no two diverging implementationsExploration required
Evaluate whether
ManagedTableshould be carried into the shared package or replaced with a more generic EUI component. The table needs to support server-side search (re-fetch on query change, to handlemaxCountExceeded), soEuiInMemoryTableis likely not suitable. Document the decision and rationale as part of this issue.