-
Notifications
You must be signed in to change notification settings - Fork 8k
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 view in apm button to alert details page #184687
[APM] add view in apm button to alert details page #184687
Conversation
/ci |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
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
const { | ||
services: { share }, | ||
} = useKibana<ObservabilityPublicPluginsStart>(); |
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 is confusing but we're already doing the same in failed_transaction_chart.tsx
, x-latency_chart.tsx
and throughput_chart.tsx
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Summary
Relates to #184204
Relates to #184236
After adding the
View in APM
buttons to APM alert details visualizations, a bug was introduced where the share plugin was not available in the codepath.This was due to using the
useAPMPluginContext
hook. APM plugin context does not exist within the observability plugin where this component is rendered.The use of
useAPMPluginContext
did work when using the visualization embeddables, because they are wrapped in context, but when using the visualizations on their own, such as in the APM latency alert details page, the experience was broken.To fix the experience, we added some defensive code and hid the button when the
share
plugin was not available.Now, we want to introduce a permenant fix to re-introduce the View in APM button the APM alert details visualization. This fix uses
useKibana
rather thanuseAPMPluginContext
to gain access to theshare
plugin.SLO APM latency SLI alert details
![image](https://private-user-images.githubusercontent.com/11356435/336224697-86fa3c4d-c0aa-4cf6-a9f1-46b8174c36d1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxNjczODEsIm5iZiI6MTcyMDE2NzA4MSwicGF0aCI6Ii8xMTM1NjQzNS8zMzYyMjQ2OTctODZmYTNjNGQtYzBhYS00Y2Y2LWE5ZjEtNDZiODE3NGMzNmQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA1VDA4MTEyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMxNzJmNTIxZTY2YzM4NTlmODAwYzJiNjg5MTlmNjJkMGRiZDdiODAyZmMzZjE4MjAzYjdhODc3Y2I4NWRmNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3f6kdKS7YDb5bSr_LzU46gY9ITLscMHedzvdenoSo0Y)
SLO APM error rate SLI alert details
![image](https://private-user-images.githubusercontent.com/11356435/336225005-a519606b-bb6f-49c5-9c91-733e5c466390.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxNjczODEsIm5iZiI6MTcyMDE2NzA4MSwicGF0aCI6Ii8xMTM1NjQzNS8zMzYyMjUwMDUtYTUxOTYwNmItYmI2Zi00OWM1LTljOTEtNzMzZTVjNDY2MzkwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA1VDA4MTEyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIxMTk5ZTJiMmI5MzdjMGRjM2EzMGZmMDc0MWMzYWFmYThkODNiZmY1MTIwNTgxYWIzMThiMzAzMzYzODQyZmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.vmFT3D9JosVLaRExklh5ZnOc16P8wTUrTQI_FOJydxE)
APM latency alert details
![image](https://private-user-images.githubusercontent.com/11356435/336225129-1c9f2037-869d-4a57-836b-63c430ca9ee5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxNjczODEsIm5iZiI6MTcyMDE2NzA4MSwicGF0aCI6Ii8xMTM1NjQzNS8zMzYyMjUxMjktMWM5ZjIwMzctODY5ZC00YTU3LTgzNmItNjNjNDMwY2E5ZWU1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA1VDA4MTEyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlNzMwNTRjNjlhYWE3YzA4YmI3MWZhMjU5NjA5MzMxOWE5NDlhNWRjOGI1Y2FkNmVmY2Y3YmU0NGYyYjgxMjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gXAuXZMnH37kZpTFgtH5PV6uPfUr7WE1m1WFCwAZszs)
Testing
Both the APM SLO burn rate rules and the APM latency rules should be tested in this PR
node scripts/synthtrace simple_trace --live
View in APM
button appearsView in APM
button appears