mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -04:00
[APM] Diplay logs only matching trace.id
query (#136927)
* [APM] Diplay logs only matching `trace.id` query * Fix log stream query * Update unit tests
This commit is contained in:
parent
6737428484
commit
1e56f9ba34
4 changed files with 6 additions and 6 deletions
|
@ -128,7 +128,7 @@ function LogsTabContent({ transaction }: { transaction: Transaction }) {
|
||||||
logView={{ type: 'log-view-reference', logViewId: 'default' }}
|
logView={{ type: 'log-view-reference', logViewId: 'default' }}
|
||||||
startTimestamp={startTimestamp - framePaddingMs}
|
startTimestamp={startTimestamp - framePaddingMs}
|
||||||
endTimestamp={endTimestamp + framePaddingMs}
|
endTimestamp={endTimestamp + framePaddingMs}
|
||||||
query={`trace.id:"${transaction.trace.id}" OR "${transaction.trace.id}"`}
|
query={`trace.id:"${transaction.trace.id}" OR (not trace.id:* AND "${transaction.trace.id})"`}
|
||||||
height={640}
|
height={640}
|
||||||
columns={[
|
columns={[
|
||||||
{ type: 'timestamp' },
|
{ type: 'timestamp' },
|
||||||
|
|
|
@ -55,7 +55,7 @@ describe('Transaction action menu', () => {
|
||||||
{
|
{
|
||||||
key: 'traceLogs',
|
key: 'traceLogs',
|
||||||
label: 'Trace logs',
|
label: 'Trace logs',
|
||||||
href: 'some-basepath/app/logs/link-to/logs?time=1580986800&filter=trace.id:%22123%22%20OR%20%22123%22',
|
href: 'some-basepath/app/logs/link-to/logs?time=1580986800&filter=trace.id:%22123%22%20OR%20(not%20trace.id:*%20AND%20%22123%22)',
|
||||||
condition: true,
|
condition: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -122,7 +122,7 @@ describe('Transaction action menu', () => {
|
||||||
{
|
{
|
||||||
key: 'traceLogs',
|
key: 'traceLogs',
|
||||||
label: 'Trace logs',
|
label: 'Trace logs',
|
||||||
href: 'some-basepath/app/logs/link-to/logs?time=1580986800&filter=trace.id:%22123%22%20OR%20%22123%22',
|
href: 'some-basepath/app/logs/link-to/logs?time=1580986800&filter=trace.id:%22123%22%20OR%20(not%20trace.id:*%20AND%20%22123%22)',
|
||||||
condition: true,
|
condition: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -188,7 +188,7 @@ describe('Transaction action menu', () => {
|
||||||
{
|
{
|
||||||
key: 'traceLogs',
|
key: 'traceLogs',
|
||||||
label: 'Trace logs',
|
label: 'Trace logs',
|
||||||
href: 'some-basepath/app/logs/link-to/logs?time=1580986800&filter=trace.id:%22123%22%20OR%20%22123%22',
|
href: 'some-basepath/app/logs/link-to/logs?time=1580986800&filter=trace.id:%22123%22%20OR%20(not%20trace.id:*%20AND%20%22123%22)',
|
||||||
condition: true,
|
condition: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -168,7 +168,7 @@ export const getSections = ({
|
||||||
path: `/link-to/logs`,
|
path: `/link-to/logs`,
|
||||||
query: {
|
query: {
|
||||||
time,
|
time,
|
||||||
filter: `trace.id:"${transaction.trace.id}" OR "${transaction.trace.id}"`,
|
filter: `trace.id:"${transaction.trace.id}" OR (not trace.id:* AND "${transaction.trace.id}")`,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
condition: true,
|
condition: true,
|
||||||
|
|
|
@ -88,7 +88,7 @@ describe('TransactionActionMenu component', () => {
|
||||||
expect(
|
expect(
|
||||||
(getByText('Trace logs').parentElement as HTMLAnchorElement).href
|
(getByText('Trace logs').parentElement as HTMLAnchorElement).href
|
||||||
).toEqual(
|
).toEqual(
|
||||||
'http://localhost/basepath/app/logs/link-to/logs?time=1545092070952&filter=trace.id:%228b60bd32ecc6e1506735a8b6cfcf175c%22%20OR%20%228b60bd32ecc6e1506735a8b6cfcf175c%22'
|
'http://localhost/basepath/app/logs/link-to/logs?time=1545092070952&filter=trace.id:%228b60bd32ecc6e1506735a8b6cfcf175c%22%20OR%20(not%20trace.id:*%20AND%20%228b60bd32ecc6e1506735a8b6cfcf175c%22)'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue