-
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] Add span subtype and action to Span Flyout #30041
[APM] Add span subtype and action to Span Flyout #30041
Conversation
…ction to the flyout if available
💔 Build Failed |
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.
LGTM 👍
retest |
💚 Build Succeeded |
Pinging @elastic/apm-ui |
const { type, subtype, action } = getSpanTypes(span); | ||
const spanTypeLabel = getSpanLabel(type); | ||
const spanSubtypeLabel = getSpanLabel(subtype); | ||
const spanActionLabel = getSpanLabel(action); |
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.
Would it make sense to split getSpanLabel
into getSpanTypeLabel
, getSpanSubTypeLabel
and getSpanActionLabel
?
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.
... and can we drop the "Label" suffix? Makes me think it's the literal "Type", "Subtype" labels - but it's actually the values
...nsactionDetails/Transaction/WaterfallContainer/Waterfall/SpanFlyout/StickySpanProperties.tsx
Show resolved
Hide resolved
function getSpanTypes(span: Span) { | ||
const { type, subtype, action } = span.span; | ||
|
||
const [primaryType, subtypeFromType, actionFromType] = type.split('.'); |
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.
Maybe add a comment, that we do this to support 6.x data.
💚 Build Succeeded |
const spanTypeLabel = getSpanLabel(getPrimaryType(span.span.type)); | ||
const { type, subtype, action } = getSpanTypes(span); | ||
const spanType = formatType(type); | ||
const spanSubtype = formatSubtype(subtype); |
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.
Last thing (I promise): can you move these formatters inside getSpanTypes
(unless we need the unformatted for anything)
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 prefer spanType
, spanSubtype
and spanAction
as the exported names over type
, subtype
and action
for clarity
💚 Build Succeeded |
* [APM] closes elastic#26247 by conditionally adding span subtype and action to the flyout if available * renamed vars for better readability and tossed out the formatting on span action * [APM] renamed some variables for clarity
* [APM] closes elastic#26247 by conditionally adding span subtype and action to the flyout if available * renamed vars for better readability and tossed out the formatting on span action * [APM] renamed some variables for clarity
Closes #26247 by conditionally adding span subtype and action to the flyout if available