[APM] increasing maxTraceItems (#149062)

In this PR I automatically collapse items after the third level
https://github.com/elastic/kibana/pull/147569. This change has boosted
the performance of the trace waterfall giving us confidence to increase
the `maxTraceItems` to 5k initially.

More details about the performance can be found here:
https://docs.google.com/document/d/1sHAISHcdfJYM7Cky2qmXHYr9unDMyvjvsjAwcwoRb9g/edit?usp=sharing
This commit is contained in:
Cauê Marcondes 2023-01-18 12:31:52 -05:00 committed by GitHub
parent f1934a3a27
commit b57b40ebad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 11 deletions

View file

@ -24,7 +24,7 @@ describe('getCriticalPath', () => {
exceedsMax: false,
spanLinksCountById: {},
traceItemCount: events.length,
maxTraceItems: 1000,
maxTraceItems: 5000,
},
entryTransaction,
});

View file

@ -159,7 +159,11 @@ export function Waterfall({
flyoutDetailTab: string
) => toggleFlyout({ history, item, flyoutDetailTab })}
showCriticalPath={showCriticalPath}
maxLevelOpen={maxLevelOpen}
maxLevelOpen={
waterfall.traceItemCount > 500
? maxLevelOpen
: waterfall.traceItemCount
}
/>
)}
</WaterfallItemsContainer>

View file

@ -139,7 +139,7 @@ describe('waterfall_helpers', () => {
exceedsMax: false,
spanLinksCountById: {},
traceItemCount: hits.length,
maxTraceItems: 1000,
maxTraceItems: 5000,
},
entryTransaction: {
processor: { event: 'transaction' },
@ -169,7 +169,7 @@ describe('waterfall_helpers', () => {
exceedsMax: false,
spanLinksCountById: {},
traceItemCount: hits.length,
maxTraceItems: 1000,
maxTraceItems: 5000,
},
entryTransaction: {
parent: { id: 'mySpanIdD' },
@ -272,7 +272,7 @@ describe('waterfall_helpers', () => {
exceedsMax: false,
spanLinksCountById: {},
traceItemCount: traceItems.length,
maxTraceItems: 1000,
maxTraceItems: 5000,
},
entryTransaction: {
processor: { event: 'transaction' },
@ -391,7 +391,7 @@ describe('waterfall_helpers', () => {
exceedsMax: false,
spanLinksCountById: {},
traceItemCount: traceItems.length,
maxTraceItems: 1000,
maxTraceItems: 5000,
},
entryTransaction: {
processor: { event: 'transaction' },

View file

@ -82,7 +82,7 @@ export const Example: Story<any> = () => {
errorDocs: errorDocs.map((error) => dedot(error, {}) as WaterfallError),
spanLinksCountById: {},
traceItemCount: traceDocs.length,
maxTraceItems: 1000,
maxTraceItems: 5000,
};
const entryTransaction = dedot(traceDocs[0]!, {}) as Transaction;

View file

@ -29,7 +29,7 @@ const configSchema = schema.object({
ui: schema.object({
enabled: schema.boolean({ defaultValue: true }),
transactionGroupBucketSize: schema.number({ defaultValue: 1000 }),
maxTraceItems: schema.number({ defaultValue: 1000 }),
maxTraceItems: schema.number({ defaultValue: 5000 }),
}),
searchAggregatedTransactions: schema.oneOf(
[

View file

@ -48,7 +48,7 @@ Object {
},
},
},
"size": 1000,
"size": 5000,
"track_total_hits": false,
},
}

View file

@ -79,7 +79,7 @@ export async function inspectSearchParams(
return {
enabled: true,
transactionGroupBucketSize: 1000,
maxTraceItems: 1000,
maxTraceItems: 5000,
};
case 'metricsInterval':
return 30;

View file

@ -52,7 +52,7 @@ export default function ApiTest({ getService }: FtrProviderContext) {
errorDocs: [],
spanLinksCountById: {},
traceItemCount: 0,
maxTraceItems: 1000,
maxTraceItems: 5000,
},
});
});