fix: rum agent should work correctly on new platform#67037
fix: rum agent should work correctly on new platform#67037vigneshshanmugam merged 5 commits intoelastic:masterfrom vigneshshanmugam:fix-apm-rum
Conversation
|
@elasticmachine merge upstream |
|
Pinging @elastic/apm-ui (Team:apm) |
| */ | ||
| const navLink = appMetadata.getNavLink(); | ||
| const pageUrl = navLink ? navLink.toJSON().url : appMetadata._url; | ||
| const appId = app.getId(); |
There was a problem hiding this comment.
In the NP this will always be core, so I'm not sure that's very useful?
There was a problem hiding this comment.
Yes, I have left a comment in the description on why its like this for now.
Since we don't have a nice way to get the currently navigated app after the Kibana is bootstrapped, we will use the app.getId() which would return
corefor NP and consolidate all transactions under core. Issue to track this #53466
I found other way to solve this was to subscribing to currentAppId and updating the transaction. But that wont work as well since it happens after the kibana app is bootstrapped. I guess we need a better way to group them right from the time the agent is initialised on. Like from the server before the agent is itself initialised, need access to the current app. Do you have any other ideas?
There was a problem hiding this comment.
Perhaps add a comment about this in the code as well.
There was a problem hiding this comment.
Sure, I will add it on my upcoming PR which I am experimenting with using window.location.href since we are using it only for dev environment and can use it till we get a solution in NP.
smith
left a comment
There was a problem hiding this comment.
This works for me and I've got data showing up from my dev machine.
I noticed that on the front end any route-change transactions show up as "Unknown" but this was probably the case before and not something new.
|
@smith Yeah that |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
History
To update your PR or re-run it, just comment with: |
…ine-editor * 'master' of github.com:elastic/kibana: (129 commits) [Canvas] Force embeddables to refresh when renderable reevaluated (#67133) [Canvas] Better handling navigating to/from canvas (#66407) [Ingest pipelines] Fix schema validation for simulate and update routes (#67199) do not use es from setup (#67277) Auto expand replicas for event log (#67286) Observability & APM do not use elasticsearch client provided via setup contract (#67263) Fix privileges check when security is not enabled (#67308) add IIS home (#66918) [ML] Adding additional job service endpoint tests (#66892) [Ingest Manager] Update fleet internal doc with latest flags (#67193) [Discover] Deangularize the loading spinner (#67165) Add `application.navigateToUrl` core API (#67110) Improve indexpattern without timefield functional test (#67031) KibanaContext in index pattern managment ui (#66985) Fix Azure metrics tutorial inside the App Home/ Add data area (#66901) add azure logs home (#66910) fix: rum agent should work correctly on new platform (#67037) [test_utils/Testbed] Move to src/test_utils folder (OSS) (#66898) only block registration when appRoute contains the exact basePath (#67125) Changed actions API endpoints urls to follow Kibana STYLEGUIDE (#65936) ... # Conflicts: # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
* fix: rum agent should work correctly on new platform * chore: add IS_KIBANA_DISTRIBUTABLE flag back Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
ELASTIC_APM_ACTIVE=true#66583app.getId()which would returncorefor NP and consolidate all transactions undercore. Issue to track this Integration of the APM RUM instrumentation on New Platform. #534663.6.0which has the correct compatibility with RUM agent to make distributed tracing work as expected and also support Service Maps.ELASTIC_APM_ACTIVEflag to true since we dont have the environment variable set on webpack bundles. In order to fix this, We use theapmConfigas a source to activate the RUM agent on the NP as its better than settingELASTIC_APM_ACTIVEon existing webpack bundles.There is an existing issue in RUM agent which would be needed to associate APM UI correctly with RUM route-change transactions. elastic/apm-agent-rum-js#791
Checklist
For maintainers