-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(apm): Initial transactions view #13920
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
Conversation
src/sentry/static/sentry/app/views/organizationEventsV2/data.jsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/views/organizationEventsV2/data.jsx
Outdated
Show resolved
Hide resolved
98faa8b
to
607e0e1
Compare
b9b15fa
to
f6d2081
Compare
src/sentry/static/sentry/app/views/organizationEventsV2/data.jsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/minimap.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/minimap.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/minimap.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans.tsx
Outdated
Show resolved
Hide resolved
|
||
const parsedTrace = this.parseTrace(); | ||
|
||
// TODO: ideally this should be provided |
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 you want this from the API? The API could ensure that all spans are ordered by start timestamp.
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.
Yep :D
I saw #14007
src/sentry/static/sentry/app/components/events/interfaces/spans.tsx
Outdated
Show resolved
Hide resolved
30c6aa2
to
446f54e
Compare
0f3b321
to
f593680
Compare
Codecov Report
@@ Coverage Diff @@
## master #13920 +/- ##
==========================================
+ Coverage 82.7% 86.66% +3.95%
==========================================
Files 3221 3230 +9
Lines 140352 140847 +495
Branches 4953 5009 +56
==========================================
+ Hits 116077 122059 +5982
+ Misses 22887 17398 -5489
- Partials 1388 1390 +2
Continue to review full report at Codecov.
|
c16ae14
to
006bd9d
Compare
src/sentry/static/sentry/app/components/events/interfaces/spans/drag_manager.tsx
Outdated
Show resolved
Hide resolved
ef17136
to
581df13
Compare
src/sentry/static/sentry/app/components/events/interfaces/spans/dragManager.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/dragManager.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/minimap.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/minimap.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/minimap.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/spanDetail.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/span_tree.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/span_tree.tsx
Outdated
Show resolved
Hide resolved
src/sentry/static/sentry/app/components/events/interfaces/spans/span_tree.tsx
Outdated
Show resolved
Hide resolved
8e552bf
to
727eac9
Compare
38e4cff
to
ce5b6ee
Compare
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.
Mashing approve on this as we need this to unblock other work around the APM-ui and tests can be added once the implementation/design settle down a bit.
return; | ||
} | ||
|
||
const rect = rectOfContent(this.props.interactiveLayerRef.current!); |
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.
what does the !
do at the end?
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.
It tells the TS compiler that current
will is not going to be null/undefined
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.
The !
operator is useful in cases when TS isn't smart enough to know that this.props.interactiveLayerRef.current
has been checked to not be null earlier.
more info here: https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#non-null-assertion-operator
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.
This operator will definitely be useful during the TS migration.
|
||
// remove listeners that were attached in onDragStart | ||
|
||
window.removeEventListener('mousemove', this.onDragMove); |
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.
Is it possible this component unmounts before a dragend event happens?
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.
Very good point 👍
I'm going to consolidate the clean up steps into a function (e.g. restoring the body style) on the next iteration of the APM frontend implementation.
|
||
render() { | ||
return ( | ||
<React.Fragment> |
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.
Is this needed?
}); | ||
}} | ||
> | ||
<InteractiveLayer style={{overflow: 'visible'}}> |
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.
Can we move the inline style into the styled component?
); | ||
}; | ||
|
||
renderViewHandles = ({ |
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.
It might make Minimap a bit easier to read if some of these render methods were components.
<React.Fragment> | ||
<SpanRow | ||
data-span-hidden={isVisible ? 'false' : 'true'} | ||
style={{ |
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 prefer this to be handled in the SC
src/sentry/static/sentry/app/components/events/interfaces/spans/spanTree.tsx
Show resolved
Hide resolved
transition: background-color 0.15s ease-in-out; | ||
|
||
&:last-child { | ||
& > [data-component='span-detail'] { |
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.
We should avoid using data
attributes for presentation like this
&:hover { | ||
background-color: rgba(189, 180, 199, 0.1); | ||
|
||
& > [data-span='true'] { |
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.
e.g. for this we could have in SpanBar
${SpanRow}:hover & {
transition: border-color 0.15s ease-in-out;
border: 1px solid rgba(0, 0, 0, 0.1);
}
Otherwise we have another set of attributes to keep track of (and there's no build time checks for data attribute refereces)
|
||
// sort span children by their start timestamps in ascending order | ||
|
||
forEach(reduced.lookup, spanChildren => { |
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.
nit, can we use Object.values().forEach()
instead of lodash?
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.
Yep will do 😄
sorry, late to the party @dashed |
@billyvg Apologizes, I just these your feedback comments just now. I'm going to note all of them down for the next iteration of the APM UI. Due to the nature of the new designs, I will be throwing away some of the implementation from this PR. |
WORK IN PROGRESS
PR dependencies
NOTE: The spans interface implementation from feat(apm) Add spans interface to events #13974 was pulled into this PR. It'll be removed once that PR is merged and this PR is rebased againstmaster
.Depends on feat(apm) Add spans interface to events #13974 (Spans Interface implementation on Django side)
Depends on fix: Remove zoom css property. #14002 (remove zoom css) for proper minimap functionality.
Depends on feat(apm) Expose transaction start & end timestamp #14007
Depends on feat(apm): Update props to address proptype warnings for new transaction attributes (SEN-800) #14040
waiting on feat: Update to JS SDK 5.6.0-beta.1 + 0.10.2 sentry-python #14116
waiting on https://github.com/getsentry/getsentry/pull/3065
TODO (top-level)
adjust tags for spans viewEDIT: moved to feat(eventsv2) Add basic transaction list #14103transactionSlug
TODO (trace view)
There are 2 versions of the trace view that can be explored.
zebra rowsEDIT: removedTODO (minimap)
Deferred to a follow-up PR
This follow-up PR will cover https://getsentry.atlassian.net/browse/SEN-866
Closes SEN-808
Closes SEN-846