Skip to content

apm-agent-rum does not set the custom transaction as root #1169

@suchcodemuchwow

Description

@suchcodemuchwow

In our kibana performance tests, we are creating a custom transaction for each journey and controlling the headless browser on our end. From the beginning of the first request, we are intercepting all browser requests and modifying headers by adding traceparent from the transaction we created for the whole journey. So basically our process looks like this:

Test Runner(FTR) ----> Chromium(playwright,apm-rum-agent) -----> Kibana Server(apm-node-agent)

What we discovered is that even though we started transactions from FTR side browser acts in the way that it's the root of the trace. And If we look at FTR service as a result we get this:

Journey-ecommerce_dashboard-Transactions-functional-test-runner-Services-APM-Observability-Elastic
Here we cannot see the frontend transaction inside the service we created.

And inside of kibana-frontend service, we can see the transactions (steps) but the order is messed up.
-app-home-Transactions-kibana-frontend-Services-APM-Observability-Elastic

And from the logs we can also see that all frontend and backend has same trace-id: 9e1f4c373e615f6010b6648b85012396

Screenshot 2022-02-17 at 15 37 59

For implementation details:
https://github.com/elastic/kibana/pull/124259/files#diff-3225cc5c1861df1fad69fa164daff4dac70d3091e9cf6d4f3b8233590cffa923R181

cc @spalger @mshustov

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions