kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[Journeys] Set traceparent for Playwright

Open dgieselaar opened this issue 1 year ago • 5 comments

Sets the traceparent for Playwright, so the trace from the test runner includes the trace events from the browser and Kibana server.

dgieselaar avatar Aug 02 '24 13:08 dgieselaar

:robot: GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

obltmachine avatar Aug 02 '24 13:08 obltmachine

This needs https://github.com/elastic/apm-agent-rum-js/pull/1521 to really work - currently the browser transaction becomes the root transaction and the parent of the backend transaction/span, and in the Journey setup, that means that you can no longer navigate the full trace from the perspective of the test runner.

dgieselaar avatar Aug 03 '24 13:08 dgieselaar

I have verified https://github.com/elastic/apm-agent-rum-js/pull/1521 works, and the initial page load is associated with the first step from the journey. However, when the page load transaction expires, and new managed transactions are started (e.g. based on an http request or a user interaction event), a new trace ID will be generated, and we can no longer see these events in the trace waterfall. I have reached out to the agent devs to see if there is a solution for that.

dgieselaar avatar Aug 27 '24 07:08 dgieselaar

Pushed a change that uses page.evaluate() to override trace.id and parent.id on every created Transaction. It's a private API so not sure if it's sustainable, will discuss with the agent folks.

dgieselaar avatar Aug 27 '24 10:08 dgieselaar

:yellow_heart: Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

  • :yellow_heart: Build #230366 was flaky 52dc0c5c9c58096efb619121ab25924b495c81ad
  • :broken_heart: Build #230047 failed 011cc4b570be93f4c8238a585620f2224ffcf3ae
  • :yellow_heart: Build #229694 was flaky e1311ea62adb5d2518330294440397dacb738c47
  • :yellow_heart: Build #225590 was flaky 35630ea51c6747f804bd52c6bd8a13dbe8218a12

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

kibana-ci avatar Aug 30 '24 07:08 kibana-ci

posting update for visibility:

After running journeys on CI, we still have an error and missing kibana server traces. Example for dashboard_listing_page journey image

We are waiting for the RUM agent PR with required changes to be merged.

dmlemeshko avatar Sep 03 '24 08:09 dmlemeshko

@elasticmachine merge upstream

dgieselaar avatar Jan 23 '25 15:01 dgieselaar

@elasticmachine merge upstream

dgieselaar avatar Jan 26 '25 08:01 dgieselaar

@elasticmachine merge upstream

dgieselaar avatar Feb 03 '25 14:02 dgieselaar

@elasticmachine merge upstream

dgieselaar avatar Feb 05 '25 16:02 dgieselaar

Starting backport for target branches: 8.18, 9.0

https://github.com/elastic/kibana/actions/runs/13163516215

kibanamachine avatar Feb 05 '25 17:02 kibanamachine

:green_heart: Build Succeeded

Metrics [docs]

✅ unchanged

History

  • :green_heart: Build #272742 succeeded b586c19d0904d8615b07fcb8e1a3c0d72440e0c6
  • :yellow_heart: Build #269742 was flaky e84cbfa753876681deab2678849412a525911ce6
  • :green_heart: Build #263944 succeeded bcacb7ab089cb9f5b9ca6a4a7053e14c0bc5811e

elasticmachine avatar Feb 05 '25 17:02 elasticmachine

💚 All backports created successfully

Status Branch Result
8.18
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine avatar Feb 05 '25 18:02 kibanamachine