-
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
Timeline transaction flyout #24027
Timeline transaction flyout #24027
Conversation
Thanks for the very thorough description and checkboxes. |
@sqren defiitely meant apm/dt, keep forgetting to switch that base when I create. Looks like the checkboxes are new, modeled after EUI's PR template or similar! |
Oh, that makes sense. I was very impressed that you were going to test it in IE11 at this stage :D |
💔 Build Failed |
location: PropTypes.object.isRequired, | ||
transaction: PropTypes.object.isRequired, | ||
urlParams: PropTypes.object.isRequired | ||
}; |
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.
Perhaps convert to typescript, since it's a new file anyway.
...location, | ||
search: fromQuery({ | ||
...toQuery(location.search), | ||
flyoutDetailTab: key |
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.
Does this currently work? I think you'll have to update urlparams.js to make it work (this is something I want to change)
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.
Yeah! I figured that out eventually (before I saw this comment unfortunately :D)
💔 Build Failed |
@@ -11,10 +11,13 @@ import { | |||
EuiTitle | |||
} from '@elastic/eui'; | |||
import React from 'react'; | |||
import { IUrlParams } from '..'; |
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.
fyi: my PR moves the urlParams interface: https://github.com/elastic/kibana/pull/23636/files#diff-07bc963256e81bcf166ef7e957b5aa11R150
.../public/components/app/TransactionDetails/Transaction/TransactionPropertiesTableForFlyout.js
Outdated
Show resolved
Hide resolved
.../public/components/app/TransactionDetails/Transaction/TransactionPropertiesTableForFlyout.js
Outdated
Show resolved
Hide resolved
.../public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/index.tsx
Outdated
Show resolved
Hide resolved
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. Only a few minor things.
💔 Build Failed |
@@ -38,6 +39,8 @@ export interface IUrlParams { | |||
transactionType: string; | |||
transactionName: string; | |||
errorGroupId: string; | |||
flyoutDetailTab: string | null; | |||
activeTimelineId: string | null; |
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 this work?
activeTimelineId: string | null; | |
activeTimelineId?: string; |
(btw. had to try out the new suggestion feature ;) )
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.
Also, you might want to rebase with apm/dt
. Lots of typescript changes :)
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 ?
doesn't work here either because that is an alias for string | undefined
but not for null. I was using null
to clear out query param values since you can't remove them easily, since they are merged in with old ones. The spanId
that exists in 6.4 sets them to null so I went with that. :)
*Open to suggestions on how to make this work better. :)
💔 Build Failed |
retest |
5e0a476
to
8e4a72f
Compare
This is all rebased and feedback addressed. :D |
...Details/Transaction/WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers.test.ts
Show resolved
Hide resolved
...ctionDetails/Transaction/WaterfallContainer/Waterfall/waterfall_helpers/waterfall_helpers.ts
Outdated
Show resolved
Hide resolved
Just remembered, for tomorrow: this flyout needs a link to go to the transaction group |
💔 Build Failed |
retest |
const { waterfall } = this.props; | ||
const { waterfall, location, urlParams } = this.props; | ||
const currentItem = | ||
urlParams.activeTimelineId && waterfall.index[urlParams.activeTimelineId]; |
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.
Why not just:
urlParams.activeTimelineId && waterfall.index[urlParams.activeTimelineId]; | |
waterfall.index[urlParams.activeTimelineId]; |
.../public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/index.tsx
Outdated
Show resolved
Hide resolved
OK if builds pass (lol) then I think this is in good shape to move on for now. We should rethink the sticky properties stuff later bc I'm not thrilled with how it's working right now, but I was able to use EUI flex components and get it laid out like the mock up so I think that's a win for this week. :) |
💔 Build Failed |
a68d7ad
to
8020e0e
Compare
💔 Build Failed |
💔 Build Failed |
51ef796
to
bd965ff
Compare
): AgentDoc | void { | ||
if (!agentName) { | ||
return; | ||
} |
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.
have to keep this return type for now because otherwise callers of this function don't know what they're getting returned, because TS can't infer from the lodash get
call.
But splitting out AgentDoc
as an interface and using it here and in the list above uncovered a bug with the javascript
object having the URL assigned to the text
key instead of url
, so yay typescript!
@@ -112,7 +123,7 @@ export const APM_AGENT_DOCS = { | |||
url: `${DOCS_ROOT}/agent/ruby/1.x/advanced.html#_adding_tags` | |||
}, | |||
javascript: { | |||
text: `${DOCS_ROOT}/agent/js-base/0.x/api.html#apm-set-tags` | |||
url: `${DOCS_ROOT}/agent/js-base/0.x/api.html#apm-set-tags` |
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.
TS was all worth it
💚 Build Succeeded |
💚 Build Succeeded |
* Adds traces overview with mock data (#22628) * Adds traces overview with mock data * Updates service overview snapshots * Updates based on review feedback * Adds tests for ManagedTable and ImpactBar * Refactored transaction overview to use new managed table component * Fixes tab size * Cleans up some tests and types * Cleans up types and tests * kbn bootstrap changes to x-pack yarn.lock * Removed jsconfig file in apm * Updates snapshot tests * Reversed bogus yarn lock change in x-pack * review feedback wip * Resolves typescript issues * [APM] Distributed tracing - Trace details (waterfall) (#22763) * [APM] Add typescript to waterfall (#23635) * [APM] Migrate get_trace and constants to Typescript (#23634) * Bump lock files * [APM] Add types for setup_request (#23762) * [APM] Adds trace overview queries and some refactoring (#23605) Refactoring includes: * ImpactBar component to align EuiProgress usage for impact bars * Sharing some logic between transaction and trace queries * Typescript support * Quick fix ‘banana’ * [APM] Ensure backwards compatibility for v1 and v2 (#23636) Fix tests Make interfaces versioned Fix ts issues Rename eventType to docType WIP Working prototype Fix tests Limit get_transaction by trace.id * Fixes trace links on traces overview (#24089) * [APM] use react-redux-request (#24117) * [APM] use react-redux-request * Stricter type checking * Bump yarn lock files * Fix package.json * Updated yarn lockfile for new yarn version * Updated dependency issues for react-router-dom types * [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 * Fix failing tests * Adds versions to transaction and span itmes when they are returned from the API (#24186) * Timeline transaction flyout (#24027) * Duplicates transaction properties table for use in flyout, with dummy values * Brings in real location and url param data for transaction flyout * Converts flyout to TS * Adds query param state for flyouts with ts support * Updates styles and uses EuiTabs for transaction flyout * Updates type references after rebase * Updated index var name per review feedback * WIP transaction flyout * WIP transaction flyout * WIP * Fixes waterfall helpers after rebasing span flyout changes * Finalizes styling for transaction flyover from timeline * Fixes layout for span flyout header * Removed accidentally committed file (should be in other branch) * Small tweaks to the sticky property layout styling * Updates snapshot tests after sticky properties converting to EUI * Final review tweaks for TS * [APM] Minor docs cleanup (#24325) * [APM] Minor docs cleanup * Fix tests * Make `text` required * Simplify documentation module * Break docs into separate files * Remove `translateAgentName` method * Formatting * [APM] Fix issues with v1 spans (#24332) * [APM] Add agent marks (#24361) * Typescript migration for the transaction endpoints (#24397) * DT transaction sample header (#24294) Transaction sample header completed * Fixes link target for traces overview to include trans/trace ids as query params * Converts Transaction index file to TS * Adds trace link to sample section * Refactors the trace link and applies it to two usages * Implements transaction sample action context menu * Calculates and implements duration percentage * Re-typed how transaction groups work * Fixes transaction flyout links and context menu * Removes unnecessary ms multiplication * Removes unused commented code * Finalizes infra links * Fixes some type shenanigans
Summary
This replaces work in #24010 after discussions with the team and me better understanding the work here. Closes #23567
UPDATE: this work also includes persisting the flyout and flyout active tab state in the query string for both the transaction flyouts and the span flyouts.
e.g.
example transaction link (with service tab active)
http://localhost:5601/app/apm#/opbeans-java/transactions/request/APIRestController~23products?_g=()&kuery=&flyoutDetailTab=service&activeTimelineId=6da58c75083c86e9
example span link
http://localhost:5601/app/apm#/opbeans-java/transactions/request/APIRestController~23products?_g=()&kuery=&flyoutDetailTab=null&activeTimelineId=1b394e907aaf708d