Skip to content
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

Merged
merged 3 commits into from
Feb 7, 2019

Conversation

ogupte
Copy link
Contributor

@ogupte ogupte commented Feb 5, 2019

Closes #26247 by conditionally adding span subtype and action to the flyout if available
screen shot 2019-02-04 at 10 43 27 pm

@ogupte ogupte self-assigned this Feb 5, 2019
@ogupte ogupte requested a review from a team as a code owner February 5, 2019 06:53
@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@formgeist formgeist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@ogupte
Copy link
Contributor Author

ogupte commented Feb 6, 2019

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@alvarolobato alvarolobato added [zube]: Inbox Team:APM All issues that need APM UI Team support and removed [zube]: Inbox labels Feb 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui

const { type, subtype, action } = getSpanTypes(span);
const spanTypeLabel = getSpanLabel(type);
const spanSubtypeLabel = getSpanLabel(subtype);
const spanActionLabel = getSpanLabel(action);
Copy link
Member

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 ?

Copy link
Member

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

function getSpanTypes(span: Span) {
const { type, subtype, action } = span.span;

const [primaryType, subtypeFromType, actionFromType] = type.split('.');
Copy link
Member

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.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

const spanTypeLabel = getSpanLabel(getPrimaryType(span.span.type));
const { type, subtype, action } = getSpanTypes(span);
const spanType = formatType(type);
const spanSubtype = formatSubtype(subtype);
Copy link
Member

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)

Copy link
Member

@sorenlouv sorenlouv Feb 7, 2019

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@ogupte ogupte merged commit 0c75084 into elastic:master Feb 7, 2019
ogupte added a commit to ogupte/kibana that referenced this pull request Feb 7, 2019
* [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
ogupte added a commit to ogupte/kibana that referenced this pull request Feb 7, 2019
* [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
ogupte added a commit that referenced this pull request Feb 8, 2019
* [APM] closes #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
ogupte added a commit that referenced this pull request Feb 8, 2019
* [APM] closes #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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:APM All issues that need APM UI Team support v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants