elastic / opbeans-java

MIT License
18 stars 40 forks source link

Enable RUM integration #21

Open felixbarny opened 5 years ago

felixbarny commented 5 years ago

Use the new API methods to enable RUM correlation: https://www.elastic.co/guide/en/apm/agent/java/master/public-api.html#api-ensure-parent-id

The difficulty is that Opbeans should probably still work with older versions. So the version of the API has to be fixed to 1.0.0.RC1 or 1.0.0, when it's released. The API is backwards compatible so it is possible to use older agents with the new API.

felixbarny commented 5 years ago

I’m not sure the RUM/backend correlation will be possible in our current opbeans setup. The frontend, including the index.html is served statically so we can’t correlate that with the backend trace as there is none.

The RUM agent calls /rum-config.js but that would create a backend transaction which is unrelated to the actual pageload. Also, *.js files are excluded from tracing in Java agent by default.

felixbarny commented 5 years ago

closing as won't fix for now

//cc @roncohen @alvarolobato

roncohen commented 5 years ago

could you add a new endpoint that would serve from HTML (for example the same index.html) but also create some spans before responding? This wouldn't be a great example initially, but would get us started

roncohen commented 5 years ago

would be great to have this as a way to demonstrate that RUM integration actually works.