Giter Club home page Giter Club logo

runtimetools / javametrics Goto Github PK

View Code? Open in Web Editor NEW
21.0 15.0 14.0 1.79 MB

Application Metrics for Java™ instruments the Java runtime for performance monitoring, providing the monitoring data visually with its built in dashboard

Home Page: https://developer.ibm.com/javasdk/application-metrics-java/

License: Apache License 2.0

Java 96.01% HTML 3.99%
java-application-metrics java performance-monitoring agent dashboard application-metrics metrics metrics-gathering monitoring performance-visualization

javametrics's People

Contributors

hhellyer avatar jcockbain avatar jonathan-spruce avatar markcor11 avatar mattcolegate avatar robbinspg avatar sjanuary avatar stalleyj avatar tobespc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javametrics's Issues

Dependency snippet on Maven Central is wrong

https://mvnrepository.com/artifact/com.ibm.runtimetools/javametrics-dash/1.0.2 contains a code snippet that shows how to add javametrics-dash as a dependency.

It is

<!-- https://mvnrepository.com/artifact/com.ibm.runtimetools/javametrics-dash -->
<dependency>
    <groupId>com.ibm.runtimetools</groupId>
    <artifactId>javametrics-dash</artifactId>
    <version>1.0.2</version>
</dependency>

but should be

<!-- https://mvnrepository.com/artifact/com.ibm.runtimetools/javametrics-dash -->
<dependency>
    <groupId>com.ibm.runtimetools</groupId>
    <artifactId>javametrics-dash</artifactId>
    <version>1.0.2</version>
    <type>war</type>
</dependency>

javametrics-prometheus-x.x.x.war does not exist in javametrics-1.0.1.zip

Installation instruction says

Download the latest Application Metrics for Java release from https://github.com/RuntimeTools/javametrics/releases/download/1.0.1/javametrics-1.0.1.zip and this contains:

    javametrics-dash-x.x.x.war - Javametrics Web Application
    javametrics-prometheus-x.x.x.war - Javametrics Prometheus Endpoint
    javametrics-agent-x.x.x.jar - Javametrics agent

However, javametrics-prometheus-x.x.x.war doesn't exist in the javametrics-1.0.1.zip

felixs-mbp:javaMetrics fmhwong$ ls -R javametrics-1.0.1
agent	client

javametrics-1.0.1/agent:
asm				javametrics-agent-1.0.1.jar

javametrics-1.0.1/agent/asm:
asm-5.0.4.jar		asm-commons-5.0.4.jar	asm-tree-5.0.4.jar

javametrics-1.0.1/client:
webapp

javametrics-1.0.1/client/webapp:
javametrics-dash

javametrics-1.0.1/client/webapp/javametrics-dash:
javametrics-dash-1.0.1.war

Environment data not appearing

I'm not getting any environment data, the problem lies with the command line which includes ":" on windows which breaks the json parsing

Unable to launch on Mac

I'm trying to use the agent on a simple Java app on my Mac. It fails on startup with the following:

objc[85996]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/bin/java (0x1047a54c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x10486d4e0). One of the two will be used. Which one is undefined.
Javametrics: Unable to start javaagent: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
at com.ibm.javametrics.instrument.Agent.premain(Agent.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.ibm.javametrics.instrument.Agent$1.loadClass(Agent.java:93)
... 11 more

maven test case-(testInstrumentHttpJspPage && testInstrumentServlet) failed

We tried to make the maven test cases ,but failed on Test for com.ibm.javametrics.instrument.
The detail as below:
testInstrumentHttpJspPage(com.ibm.javametrics.instrument.InstrumentTest) Time elapsed: 3.017 sec <<< FAILURE!
java.lang.AssertionError: Should be emitting Http data
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at com.ibm.javametrics.instrument.InstrumentTest.testInstrumentHttpJspPage(InstrumentTest.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:507)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:507)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

testInstrumentServlet(com.ibm.javametrics.instrument.InstrumentTest) Time elapsed: 3.027 sec <<< FAILURE!
java.lang.AssertionError: Should be instrumenting HttpServlet.service
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at com.ibm.javametrics.instrument.InstrumentTest.testInstrumentServlet(InstrumentTest.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:507)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:507)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Double quotes should be removed in the -javaagent path

Instruction for running java metrics in WebSphere Liberty has this:

# Load Javametrics Java agent
-javaagent:"/path_to_install_dir/javametrics-agent-1.0.1.jar"

If I include the double quotes, Liberty started up failed with this in console.log

objc[95896]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java (0x100ed64c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x100fd04e0). One of the two will be used. Which one is undefined.
Error opening zip file or JAR manifest missing : "/Users/fmhwong/work/metrics/javaMetrics/javametrics-1.0.1/agent/javametrics-agent-1.0.1.jar"
Error occurred during initialization of VM
agent library failed to init: instrument

The instruction should not have the double quotes.

Exception thrown by memPoolsChart.js on resize.

The memory pools chart (Heap Usage) throws exceptions to the JavaScript console when it is resized or goes from visible to invisible:

  | i | @ | d3.v3.min.js:1
-- | -- | -- | --
  | (anonymous) | @ | d3.v3.min.js:3
  | Y | @ | d3.v3.min.js:1
  | Co.each | @ | d3.v3.min.js:3
  | Co.attr | @ | d3.v3.min.js:3
  | resizeMemPoolsChart | @ | memPoolsChart.js:305
  | resize | @ | (index):165
  | (anonymous) | @ | httpThroughPutChart.js:180
  | (anonymous) | @ | d3.v3.min.js:1

It throws four, one for each of the lines it's drawing and I only seem to be able to reproduce this on Chrome.

Add units data to the summary report

The summary report needs to be improved by adding the units of data for each data type. This makes the data more usable by other products using the summary report

Exception in SpringBoot Application at shutdown with dashboard running

2018-02-09 14:43:35.388 INFO 19205 --- [pool-2-thread-1] o.a.c.loader.WebappClassLoaderBase : Illegal access: this web application instance has been stopped already. Could not load [META-INF/services/javax.json.spi.JsonProvider]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [META-INF/services/javax.json.spi.JsonProvider]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305) [tomcat-embed-core-8.5.15.jar:8.5.15]
at org.apache.catalina.loader.WebappClassLoaderBase.findResources(WebappClassLoaderBase.java:933) [tomcat-embed-core-8.5.15.jar:8.5.15]
at java.lang.ClassLoader.getResources(ClassLoader.java:1142) [na:1.8.0_144]
at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:348) [na:1.8.0_144]
at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393) [na:1.8.0_144]
at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474) [na:1.8.0_144]
at javax.json.spi.JsonProvider.provider(JsonProvider.java:89) [javax.json-1.0.4.jar:1.0.4]
at javax.json.Json.createReader(Json.java:208) [javax.json-1.0.4.jar:1.0.4]
at com.ibm.javametrics.web.DataHandler.processData(DataHandler.java:93) [javametrics-spring-1.1.0.jar:na]
at com.ibm.javametrics.client.ApiDataListener.receive(ApiDataListener.java:29) [javametrics-agent-1.1.0.jar:1.1.0]
at com.ibm.javametrics.impl.JavametricsImpl.receiveData(JavametricsImpl.java:69) [javametrics-agent-1.1.0.jar:1.1.0]
at com.ibm.javametrics.agent.JavaAgent.lambda$emit$1(JavaAgent.java:96) [javametrics-agent-1.1.0.jar:1.1.0]
at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_144]
at com.ibm.javametrics.agent.JavaAgent.emit(JavaAgent.java:95) [javametrics-agent-1.1.0.jar:1.1.0]
at com.ibm.javametrics.agent.JavaAgent.drainBatched(JavaAgent.java:89) [javametrics-agent-1.1.0.jar:1.1.0]
at com.ibm.javametrics.agent.JavaAgent.lambda$drain$0(JavaAgent.java:67) [javametrics-agent-1.1.0.jar:1.1.0]
at java.util.HashMap.forEach(HashMap.java:1288) ~[na:1.8.0_144]
at com.ibm.javametrics.agent.JavaAgent.drain(JavaAgent.java:66) [javametrics-agent-1.1.0.jar:1.1.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_144]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[na:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_144]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[na:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_144]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_144]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_144]

javametrics: Exception in listener: java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [META-INF/services/javax.json.spi.JsonProvider]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.