Open prabuj201987 opened 7 years ago
The widget will only be injected on html pages. What kind of content is you application serving? JSON?
The Call Tree and Request tabs are not available when accessing the /stagemonitor
url as there is no particular request attached to it.
To enable the alerts tab, you have to include the stagemonitor-alerting
plugin.
I tried adding the widget in one of my existing web application which is running on tomcat 7. I could see the widget but no response upon clicking it? kindly advice.
Any JS errors in the console?
Yes there is an
Uncaught SyntaxError: Unexpected number
in below line.
data = {"duration_cpu_ms":998.4064,"instance":192.168.x.x,"http.headers.accept-language":en-US,en;q=0.8,"tracking.unique_visitor_id":7ad9483e97a3f1882a08a1831c3d7967f85d28e7,"http.url":/app-monitor/,"type":http,"http.headers.accept":text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,"http.headers.pragma":no-cache,","http.headers.cache-control":no-cache,"http.headers.connection":keep-alive,"http.headers.host":192.168.x.x:7180,"span.kind":server,"host":xxxxxxxxx,"id":84c671a6004d97fa,"jdbc_get_connection_count":2,"trace_id":84c671a6004d97fa,"method":GET,"http.headers.user-agent":Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36,"session_id":69489BC8DA1817D46323ABB0FEE04F39,"peer.port":60688,"peer.ipv4":-105,"http.status_code":200,"http.headers.accept-encoding":gzip, deflate,"application":My-Application,"call_tree_json":{"signature":"Hello Thyme","executionTime":4231460295,"children":[{"signature":"","executionTime":177440654,"children":[],"ioquery":true,"netExecutionTime":177440654,"shortSignature":""},{"signature":"","executionTime":194076506,"children":[],"ioquery":true,"netExecutionTime":194076506,"shortSignature":""},{"signature":"void org.springframework.web.servlet.FrameworkServlet.service(HttpServletRequest,HttpServletResponse)","executionTime":571366733,"children":[{"signature":"void org.springframework.web.servlet.DispatcherServlet.render(ModelAndView,HttpServletRequest,HttpServletResponse)","executionTime":533597640,"children":[],"ioquery":false,"netExecutionTime":533597640,"shortSignature":"DispatcherServlet#render"}],"ioquery":false,"netExecutionTime":37769093,"shortSignature":"FrameworkServlet#service"}],"ioquery":false,"netExecutionTime":3288576402,"shortSignature":null},"stagemonitor.version":0.82.0,"gc_time_ms":33,"jdbc_connection_wait_time_ms":2912.365781,"http.headers.upgrade-insecure-requests":1,"peer.ipv4_string":192.168.x.x,"error":false,"name":"Hello Thyme","duration_ms":4251.690156,"@timestamp":"2017-09-01T15:11:52.985+0530"},
That's a strange one..
Could you send me the whole html page? If you don't want to post it publicly, you can send me a mail to felix(dot)barnsteiner(at)isys.de
I have a very similar issue. The problem appears to be that the values in the data object embedded in stagemonitor init is not quoted:
function init() {
var stagemonitorOverlayShow = document.getElementById("stagemonitor-overlay-show"),
stagemonitorOverlay = document.getElementById("stagemonitor-overlay"),
data = {"duration_cpu_ms":29.839661,"instance":dev,"http.headers.accept-language":en-US,en;q=0.8,
Note specifically: "http.headers.accept-language":en-US,en;q=0.8, where the (;) causes the syntax error in my case (Uncaught SyntaxError: Unexpected token ;).
I don't think the quoting is the problem. When I view the source in chrome i get this:
function init() {
var stagemonitorOverlayShow = document.getElementById("stagemonitor-overlay-show"),
stagemonitorOverlay = document.getElementById("stagemonitor-overlay"),
data = {"duration_cpu_ms":1.567337,"http.headers.accept-language":"de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7"
I'm also not able to see Call Tree in http://localhost:8888/stagemonitor.
And spring boot logs are,
o.s.tracing.soap.SoapHandlerTransformer : Adding SOAPHandlers [org.stagemonitor.tracing.soap.TracingServerSOAPHandler@6cc558c6, org.stagemonitor.tracing.soap.TracingClientSOAPHandler@15713d56] org.stagemonitor.core.Stagemonitor : Measurement Session is initialized: [application=asn_dashboard] [instance="localhost"] [host=m-C02RP2M2G8WN] org.stagemonitor.core.CorePlugin : Not sending metrics to InfluxDB (url=null, interval=60s) org.stagemonitor.core.CorePlugin : Not sending metrics to Elasticsearch (url=[], interval=60s) org.stagemonitor.tracing.TracingPlugin : No OpenTracing implementation found. Falling back to DefaultTracerImpl. This is fine if you just want to use stagemonitor for development, for example with the in-browser-widget. If you want to report your traces to Elasticsearch, add a dependency to stagemonitor-tracing-elasticsearch. If you want to report to Zipkin, add stagemonitor-tracing-zipkin. org.stagemonitor.core.Stagemonitor : # stagemonitor status org.stagemonitor.core.Stagemonitor : System information: Java 1.8.0_101 (Oracle Corporation) Mac OS X 10.12.6 org.stagemonitor.core.Stagemonitor : OK - Agent attachment org.stagemonitor.core.Stagemonitor : OK - CorePlugin (version 0.85.0) org.stagemonitor.core.Stagemonitor : FAIL - Elasticsearch (Elasticsearch is not available) org.stagemonitor.core.Stagemonitor : OK - JdbcPlugin (version 0.85.0) org.stagemonitor.core.Stagemonitor : OK - JvmPlugin (version 0.85.0) org.stagemonitor.core.Stagemonitor : OK - ServletPlugin (version 0.85.0) org.stagemonitor.core.Stagemonitor : OK - SoapTracingPlugin (version 0.85.0) org.stagemonitor.core.Stagemonitor : OK - Startup org.stagemonitor.core.Stagemonitor : OK - TracingPlugin (version 0.85.0) org.stagemonitor.core.Stagemonitor : # stagemonitor configuration, listing non-default values: org.stagemonitor.core.Stagemonitor : stagemonitor.profiler.minExecutionTimeNanos: 0 (source: stagemonitor.properties) org.stagemonitor.core.Stagemonitor : stagemonitor.profiler.minExecutionTimePercent: 0 (source: stagemonitor.properties) org.stagemonitor.core.Stagemonitor : stagemonitor.tracing.reporting.log: true (source: stagemonitor.properties) org.stagemonitor.core.Stagemonitor : stagemonitor.applicationName: my_app_name (source: stagemonitor.properties) org.stagemonitor.core.Stagemonitor : stagemonitor.instanceName: "localhost" (source: stagemonitor.properties) org.stagemonitor.core.Stagemonitor : stagemonitor.instrument.include: com (source: stagemonitor.properties)
In the html page, I can see that call tree tab is there but it is hidden by default. Even if I change the html, it is getting hidden on clicking it.
<li id="call-stack-tab" class="" style="display: none;"> <a href="#stagemonitor-home" role="tab" data-toggle="tab" class="tip" data-placement="bottom" title="" data-original-title="View method call tree of the current request including SQL statements" aria-expanded="true"> Call Tree </a> </li>
had just encountered this issue again with a coworker on a different branch. we managed to pinpoint it to a bug in jackson. upgrade of jackson resolved the issue (with the "Unexpected token" manifestation i commented about earlier).
I also cannot see the call tree tab, just Widget Settings, Configuration, Metrics and Alerts.
I have these in my pom
<dependency>
<groupId>org.stagemonitor</groupId>
<artifactId>stagemonitor-web-servlet</artifactId>
<version>0.88.4</version>
</dependency>
<dependency>
<groupId>org.stagemonitor</groupId>
<artifactId>stagemonitor-tracing</artifactId>
<version>0.88.4</version>
</dependency>
<dependency>
<groupId>org.stagemonitor</groupId>
<artifactId>stagemonitor-logging</artifactId>
<version>0.88.4</version>
</dependency>
<dependency>
<groupId>org.stagemonitor</groupId>
<artifactId>stagemonitor-jvm</artifactId>
<version>0.88.4</version>
</dependency>
<dependency>
<groupId>org.stagemonitor</groupId>
<artifactId>stagemonitor-alerting</artifactId>
<version>0.88.4</version>
</dependency>
<dependency>
<groupId>org.stagemonitor</groupId>
<artifactId>stagemonitor-core</artifactId>
<version>0.88.4</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
Hi, I am running a sample Hello world spring boot web application with stage monitor. Below is my startup log.
Problems: