Open ckornaros opened 6 years ago
Hi @ckornaros - to clarify, you have a react page that isn't served by rails, that makes ajax calls into a rails app?
If that's what you're looking for, then it is already on our radar, keep track of the agent issue at: https://github.com/scoutapp/scout_apm_ruby/issues/106
@cschneid Not exactly. We have react pages served by rails (and we can use devtrace on it) but our react components use ajax calls (to get information or to refresh data) and then devtrace cause 500 and we're unable to have any information. But it's probably a simmilar issue.
@ckornaros - mind sharing the exception you are seeing?
DevTrace does collect information on AJAX calls if the initial page is served via Rails.
@itsderek23 It's hard to share you exception because there not really exist. Here is what my developement.log return during my ajax call:
[active_model_serializers] Rendered ActiveModel::Serializer::Null with Hash (4.76ms)
Completed 200 OK in 188ms (Views: 4.5ms | ActiveRecord: 38.8ms)
Looks good but in my browser I received a 502 :(
Just bellow more log :
my_app | 172.18.0.1 - - [25/Jan/2018:10:01:32 +0000] "PATCH /admin/tests/15319/ajax_call HTTP/1.0" 200 - 0.5261
nginx_1 | 172.18.0.1 - - [25/Jan/2018:10:01:32 +0000] "PATCH /admin/tests/15319/ajax_call HTTP/1.1" 502 73647 "https://my_address.test/admin/tests/dashboard" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0"
my_app | 172.18.0.1 - - [25/Jan/2018:10:01:32 +0000] "GET /500.html HTTP/1.0" 200 73647 0.0090
It would be nice to support applications that doesn't actually render anything - e.g. API servers.
In my case I have a node dashboard talking to a rails API backend, and I would love to get the metrics from the rails app. Even if it printed in the logs a url to manually copy and paste on the browser for every request it would already be helpful
Been a few year since this was opened. Any update on support for APIs?
Would love to see API support as well
If you're using Rails with web framework (React, Angular, etc.) and ajax call, DevTrace will only work on static page but will fail on ajax call :( Same issue with api call. As there is no render page we cannot use DevTrace. Maybe we can have a page with a list of recent requests or the link in a custom header?