-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] Display transaction info on span flyout (#24189)
* [APM] Display transaction info on span flyout * Add links * Fix tests * Eui fixes * Remove color from span type
- Loading branch information
1 parent
cb3c28e
commit 4d01d0b
Showing
12 changed files
with
169 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...tails/Transaction/WaterfallContainer/Waterfall/SpanFlyout/StickyTransactionProperties.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { | ||
SERVICE_NAME, | ||
TRANSACTION_NAME | ||
} from 'x-pack/plugins/apm/common/constants'; | ||
import { | ||
KibanaLink, | ||
legacyEncodeURIComponent | ||
// @ts-ignore | ||
} from 'x-pack/plugins/apm/public/utils/url'; | ||
import { Transaction } from 'x-pack/plugins/apm/typings/Transaction'; | ||
// @ts-ignore | ||
import { StickyProperties } from '../../../../../../shared/StickyProperties'; | ||
|
||
interface Props { | ||
transaction: Transaction; | ||
} | ||
|
||
export function StickyTransactionProperties({ transaction }: Props) { | ||
const stickyProperties = [ | ||
{ | ||
label: 'Service', | ||
fieldName: SERVICE_NAME, | ||
val: ( | ||
<KibanaLink | ||
pathname={'/app/apm'} | ||
hash={`/${transaction.context.service.name}`} | ||
> | ||
{transaction.context.service.name} | ||
</KibanaLink> | ||
) | ||
}, | ||
{ | ||
label: 'Transaction', | ||
fieldName: TRANSACTION_NAME, | ||
val: ( | ||
<KibanaLink | ||
pathname={'/app/apm'} | ||
hash={`/${transaction.context.service.name}/transactions/${ | ||
transaction.transaction.type | ||
}/${legacyEncodeURIComponent(transaction.transaction.name)}`} | ||
> | ||
{transaction.transaction.name} | ||
</KibanaLink> | ||
) | ||
} | ||
]; | ||
|
||
return <StickyProperties stickyProperties={stickyProperties} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.