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

Add search deep links for APM, Metrics, Logs, and Dev Tools #96135

Merged
merged 5 commits into from
Apr 19, 2021

Conversation

joshdover
Copy link
Contributor

Summary

Partially addresses #92153

Right now this PR adds deep links to Kibana's search for the APM, Metrics, Logs, and Dev Tools apps.

For APM, Metrics, and Logs I accomplished this by copying the route paths and translation strings. I've left comments explaining that these need to be kept in sync across files. Of course we should probably extract these into a common file, but that should be done by the individual teams and we'd like to get this feature rolled out more widely in the meantime.

Dev Tools should be fine as-is without needing any changes by the team. The only caveat is it does not currently add a link for the "Painless Lab" tool because that tool does not provide a string title, only a React component, so I was unable to add that one. It should be addressed separately.

This PR does not currently include any tests. I'm not inclined to add any except for the Dev Tools app since it actually contains logic changes, but it would be good for test coverage to be added in the future to be sure that these URLs are correct. I am electing to delegate that to the individual solution teams. I'm opening this PR now to get feedback on this approach before adding the tests for Dev Tools.

I was unable to add deep links for the Monitoring and Fleet apps at this time. Fleet is using a hash-based router which is not actually supported by the platform, so in-app navigations using search are currently broken. I've opened an issue to discuss this: #96134. Monitoring faces a similar problem, but it is using Angular which is also not 100% compatible with the Platform's router. They will need to migrate away from Angular before I think we can solve this.

@elastic/apm-ui @elastic/observability-ui @elastic/es-ui Feedback would be appreciated before I continue forward. Thanks all!

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@joshdover joshdover added release_note:enhancement Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0 v7.13.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Apr 2, 2021
Comment on lines +145 to +165
{
id: 'services',
title: i18n.translate('xpack.apm.breadcrumb.servicesTitle', {
defaultMessage: 'Services',
}),
path: '/services',
},
{
id: 'traces',
title: i18n.translate('xpack.apm.breadcrumb.tracesTitle', {
defaultMessage: 'Traces',
}),
path: '/traces',
},
{
id: 'service-map',
title: i18n.translate('xpack.apm.breadcrumb.serviceMapTitle', {
defaultMessage: 'Service Map',
}),
path: '/service-map',
},
Copy link
Member

Choose a reason for hiding this comment

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

If we implement a getDeepLink that pulls the necessary info from the routes obejct, we can probably replace this with something like:

Suggested change
{
id: 'services',
title: i18n.translate('xpack.apm.breadcrumb.servicesTitle', {
defaultMessage: 'Services',
}),
path: '/services',
},
{
id: 'traces',
title: i18n.translate('xpack.apm.breadcrumb.tracesTitle', {
defaultMessage: 'Traces',
}),
path: '/traces',
},
{
id: 'service-map',
title: i18n.translate('xpack.apm.breadcrumb.serviceMapTitle', {
defaultMessage: 'Service Map',
}),
path: '/service-map',
},
getDeepLink('services'),
getDeepLink('traces'),
getDeepLink('service-map'),

Not needed for this PR though.

Copy link
Member

@sorenlouv sorenlouv left a comment

Choose a reason for hiding this comment

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

Thanks for initiating this!

@joshdover joshdover marked this pull request as ready for review April 12, 2021 14:36
@joshdover joshdover requested review from a team as code owners April 12, 2021 14:36
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@botelastic botelastic bot added the Team:APM All issues that need APM UI Team support label Apr 12, 2021
Copy link
Contributor

@sebelga sebelga left a comment

Choose a reason for hiding this comment

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

ES UI changes LGTM

Comment on lines +96 to +97
title: tool.title as string,
path: `#/${tool.id}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you change DevToolApp.title from string to ReactNode to then forcecast it to string here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that wasn't super clear was it. It's because there is a dev tool (Painless Lab) that is passing a component here to be rendered in the tabs UI. So I fixed the type on DevToolApp to be accurate and then filtered that dev tool out (for now) and casted this to a string.

@joshdover
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
apm 29.4KB 29.8KB +484.0B
devTools 16.2KB 16.4KB +229.0B
infra 141.8KB 143.0KB +1.2KB
total +1.9KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@jasonrhodes jasonrhodes left a comment

Choose a reason for hiding this comment

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

LGTM

@joshdover joshdover merged commit 38ac8e5 into elastic:master Apr 19, 2021
@joshdover joshdover deleted the add-solution-deep-links branch April 19, 2021 18:52
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 19, 2021
…96135)

* Add searchDeepLinks for APM

* Add searchDeepLinks for Metrics and Logs

* Add searchDeepLinks for Dev Tools

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Apr 19, 2021
…97511)

* Add searchDeepLinks for APM

* Add searchDeepLinks for Metrics and Logs

* Add searchDeepLinks for Dev Tools

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Josh Dover <[email protected]>
@cauemarcondes cauemarcondes self-assigned this May 4, 2021
@cauemarcondes cauemarcondes added the apm:test-plan-done Pull request that was successfully tested during the test plan label May 4, 2021
madirey pushed a commit to madirey/kibana that referenced this pull request May 11, 2021
…96135)

* Add searchDeepLinks for APM

* Add searchDeepLinks for Metrics and Logs

* Add searchDeepLinks for Dev Tools

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:test-plan-7.13.0 apm:test-plan-done Pull request that was successfully tested during the test plan auto-backport Deprecated - use backport:version if exact versions are needed release_note:enhancement Team:APM All issues that need APM UI Team support Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants