JVM Profiler Sending Metrics to Kafka, Console Output or Custom Reporter

Overview

Uber JVM Profiler

Build Status

Uber JVM Profiler provides a Java Agent to collect various metrics and stacktraces for Hadoop/Spark JVM processes in a distributed way, for example, CPU/Memory/IO metrics.

Uber JVM Profiler also provides advanced profiling capabilities to trace arbitrary Java methods and arguments on the user code without user code change requirement. This feature could be used to trace HDFS name node call latency for each Spark application and identify bottleneck of name node. It could also trace the HDFS file paths each Spark application reads or writes and identify hot files for further optimization.

This profiler is initially created to profile Spark applications which usually have dozens of or hundreds of processes/machines for a single application, so people could easily correlate metrics of these different processes/machines. It is also a generic Java Agent and could be used for any JVM process as well.

How to Build

  1. Make sure JDK 8+ and maven is installed on your machine.
  2. Run: mvn clean package

This command creates jvm-profiler.jar file with the default reporters like ConsoleOutputReporter, FileOutputReporter and KafkaOutputReporter bundled in it. If you want to bundle the custom reporters like RedisOutputReporter or InfluxDBOutputReporter in the jar file then provide the maven profile id for that reporter in the build command. For example to build a jar file with RedisOutputReporter, you can execute mvn -P redis clean package command. Please check the pom.xml file for available custom reporters and their profile ids.

Example to Run with Spark Application

You could upload jvm-profiler jar file to HDFS so the Spark application executors could access it. Then add configuration like following when launching Spark application:

--conf spark.jars=hdfs://hdfs_url/lib/jvm-profiler-1.0.0.jar
--conf spark.executor.extraJavaOptions=-javaagent:jvm-profiler-1.0.0.jar

Example to Run with Java Application

Following command will start the example application with the profiler agent attached, which will report metrics to the console output:

java -javaagent:target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReporter,tag=mytag,metricInterval=5000,durationProfiling=com.uber.profiling.examples.HelloWorldApplication.publicSleepMethod,argumentProfiling=com.uber.profiling.examples.HelloWorldApplication.publicSleepMethod.1,sampleInterval=100 -cp target/jvm-profiler-1.0.0.jar com.uber.profiling.examples.HelloWorldApplication

Example to Run with Executable Jar

Use following command to run jvm profiler with executable jar application.

java -javaagent:/opt/jvm-profiler/target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReporter,metricInterval=5000,durationProfiling=foo.bar.FooAppication.barMethod,sampleInterval=5000 -jar foo-application.jar

Example to Run with Tomcat

Set the jvm profiler in CATALINA_OPTS before starting the tomcat server. Check logs/catalina.out file for metrics.

export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/jvm-profiler/target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReporter,metricInterval=5000,durationProfiling=foo.bar.FooController.barMethod,sampleInterval=5000"

Example to Run with Spring Boot Maven Plugin

Use following command to use jvm profiler with Spring Boot 2.x. For Spring Boot 1.x use -Drun.arguments instead of -Dspring-boot.run.jvmArguments in following command.

mvn spring-boot:run -Dspring-boot.run.jvmArguments="-javaagent:/opt/jvm-profiler/target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReporter,metricInterval=5000,durationProfiling=foo.bar.FooController.barMethod,sampleInterval=5000"

Send Metrics to Kafka

Uber JVM Profiler supports sending metrics to Kafka. For example,

java -javaagent:target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.KafkaOutputReporter,metricInterval=5000,brokerList=localhost:9092,topicPrefix=profiler_ -cp target/jvm-profiler-1.0.0.jar com.uber.profiling.examples.HelloWorldApplication

It will send metrics to Kafka topic profiler_CpuAndMemory. See bottom of this document for an example of the metrics.

More Details

See JVM Profiler Blog Post.

Feature List

Uber JVM Profiler supports following features:

  1. Debug memory usage for all your spark application executors, including java heap memory, non-heap memory, native memory (VmRSS, VmHWM), memory pool, and buffer pool (directed/mapped buffer).

  2. Debug CPU usage, Garbage Collection time for all spark executors.

  3. Debug arbitrary java class methods (how many times they run, how much duration they spend). We call it Duration Profiling.

  4. Debug arbitrary java class method call and trace it argument value. We call it Argument Profiling.

  5. Do Stacktrack Profiling and generate flamegraph to visualize CPU time spent for the spark application.

  6. Debug IO metrics (disk read/write bytes for the application, CPU iowait for the machine).

  7. Debug JVM Thread Metrics like Count of Total Threads, Peak Threads, Live/Active Threads and newly Threads.

Parameter List

The java agent supports following parameters, which could be used in Java command line like "-javaagent:agent_jar_file.jar=param1=value1,param2=value2":

  • reporter: class name for the reporter, e.g. com.uber.profiling.reporters.ConsoleOutputReporter, or com.uber.profiling.reporters.KafkaOutputReporter, which are already implemented in the code. You could implement your own reporter and set the name here.

  • configProvider: class name for the config provider, e.g. com.uber.profiling.YamlConfigProvider, which are already implemented in the code. You could implement your own config provider and set the name here.

  • configFile: config file path to be used by YamlConfigProvider (if configProvider is set to com.uber.profiling.YamlConfigProvider). This could be a local file path or HTTP URL.

  • tag: plain text string which will be reported together with the metrics.

  • metricInterval: how frequent to collect and report the metrics, in milliseconds.

  • durationProfiling: configure to profile specific class and method, e.g. com.uber.profiling.examples.HelloWorldApplication.publicSleepMethod. It also support wildcard (*) for method name, e.g. com.uber.profiling.examples.HelloWorldApplication.*.

  • argumentProfiling: configure to profile specific method argument, e.g. com.uber.profiling.examples.HelloWorldApplication.publicSleepMethod.1 (".1" means getting value for the first argument and sending out in the reporter).

  • sampleInterval: frequency (milliseconds) to do stacktrace sampling, if this value is not set or zero, the profiler will not do stacktrace sampling.

  • ioProfiling: whether to profile IO metrics, could be true or false.

  • brokerList: broker list if using com.uber.profiling.reporters.KafkaOutputReporter.

  • topicPrefix: topic prefix if using com.uber.profiling.reporters.KafkaOutputReporter. KafkaOutputReporter will send metrics to multiple topics with this value as the prefix for topic names.

  • outputDir: output directory if using com.uber.profiling.reporters.FileOutputReporter. FileOutputReporter will write metrics into this directory.

YAML Config File

The parameters could be provided as arguments in java command, or in a YAML config file if you use configProvider=com.uber.profiling.YamlConfigProvider. Following is an example of the YAML config file:

reporter: com.uber.profiling.reporters.ConsoleOutputReporter
metricInterval: 5000

Metrics Example

Following is an example of CPU and Memory metrics when using ConsoleOutputReporter or KafkaOutputReporter:

{
	"nonHeapMemoryTotalUsed": 11890584.0,
	"bufferPools": [
		{
			"totalCapacity": 0,
			"name": "direct",
			"count": 0,
			"memoryUsed": 0
		},
		{
			"totalCapacity": 0,
			"name": "mapped",
			"count": 0,
			"memoryUsed": 0
		}
	],
	"heapMemoryTotalUsed": 24330736.0,
	"epochMillis": 1515627003374,
	"nonHeapMemoryCommitted": 13565952.0,
	"heapMemoryCommitted": 257425408.0,
	"memoryPools": [
		{
			"peakUsageMax": 251658240,
			"usageMax": 251658240,
			"peakUsageUsed": 1194496,
			"name": "Code Cache",
			"peakUsageCommitted": 2555904,
			"usageUsed": 1173504,
			"type": "Non-heap memory",
			"usageCommitted": 2555904
		},
		{
			"peakUsageMax": -1,
			"usageMax": -1,
			"peakUsageUsed": 9622920,
			"name": "Metaspace",
			"peakUsageCommitted": 9830400,
			"usageUsed": 9622920,
			"type": "Non-heap memory",
			"usageCommitted": 9830400
		},
		{
			"peakUsageMax": 1073741824,
			"usageMax": 1073741824,
			"peakUsageUsed": 1094160,
			"name": "Compressed Class Space",
			"peakUsageCommitted": 1179648,
			"usageUsed": 1094160,
			"type": "Non-heap memory",
			"usageCommitted": 1179648
		},
		{
			"peakUsageMax": 1409286144,
			"usageMax": 1409286144,
			"peakUsageUsed": 24330736,
			"name": "PS Eden Space",
			"peakUsageCommitted": 67108864,
			"usageUsed": 24330736,
			"type": "Heap memory",
			"usageCommitted": 67108864
		},
		{
			"peakUsageMax": 11010048,
			"usageMax": 11010048,
			"peakUsageUsed": 0,
			"name": "PS Survivor Space",
			"peakUsageCommitted": 11010048,
			"usageUsed": 0,
			"type": "Heap memory",
			"usageCommitted": 11010048
		},
		{
			"peakUsageMax": 2863661056,
			"usageMax": 2863661056,
			"peakUsageUsed": 0,
			"name": "PS Old Gen",
			"peakUsageCommitted": 179306496,
			"usageUsed": 0,
			"type": "Heap memory",
			"usageCommitted": 179306496
		}
	],
	"processCpuLoad": 0.0008024004394748531,
	"systemCpuLoad": 0.23138430784607697,
	"processCpuTime": 496918000,
	"appId": null,
	"name": "24103@machine01",
	"host": "machine01",
	"processUuid": "3c2ec835-749d-45ea-a7ec-e4b9fe17c23a",
	"tag": "mytag",
	"gc": [
		{
			"collectionTime": 0,
			"name": "PS Scavenge",
			"collectionCount": 0
		},
		{
			"collectionTime": 0,
			"name": "PS MarkSweep",
			"collectionCount": 0
		}
	]
}

Metric Details

A list of all metrics and information corresponding to them can be found here.

Generate flamegraph of Stacktrack Profiling result

We can take the output of Stacktrack Profiling to generate flamegraph to visualize CPU time. Using the Python script stackcollapse.py, following command will collapse Stacktrack Profiling json output file to the input file format for generating flamegraph. The script flamegraph.pl can be found at FlameGraph.

python stackcollapse.py -i Stacktrace.json > Stacktrace.folded
flamegraph.pl Stacktrace.folded > Stacktrace.svg

Note that it is required to enable stacktrace sampling, in order to generate flamegraph. To enable it, please set sampleInterval parameter. If it is not set or zero, the profiler will not do stacktrace sampling.

Comments
  • Spark Executor extraJavaOptions not working

    Spark Executor extraJavaOptions not working

    Hello,

    I have been using the JVM profiler on a supercomputing cluster for a bit now. The spark.driver.extraJavaOptions string seems to work fine and the Console Reporter writes profiling information to the output log file. When I use spark.executor.extraJavaOptions string the profiler doesn't seem to work. Spark on the cluster is setup as Standalone and runs in client mode. I was hoping if you could help me with this.

    The command I use to run the profiler is:- spark-submit --executor-cores 8 --driver-memory 20G --executor-memory 20G --conf spark.driver.extraJavaOptions=-javaagent:/home/rvenka21/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReport --conf spark.executor.extraJavaOptions=-javaagent:/home/rvenka21/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReport --class Main "tool to be profiled"

    Log information:- Java Agent 1.0.0 premain args: reporter=com.uber.profiling.reporters.ConsoleOutputReporter 1554139518375 com.uber.profiling.Arguments: Got argument value for reporter: com.uber.profiling.reporters.ConsoleOutputReporter ConsoleOutputReporter - ProcessInfo: {"jvmInputArguments":"","role":"driver","jvmClassPath":"","epochMillis":1554139518509,"cmdline":"/usr/java/latest/bin/java -cp /home/rvenka21/mycluster.conf/spark/:/share/apps/compute/spark/spark-2.4.0-bin-hadoop2.6/jars/*:/home/rvenka21/mycluster.conf/ -Xmx20G -javaagent:/home/rvenka21/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReporter org.apache.spark.deploy.SparkSubmit --conf spark.driver.memory=20G --conf spark.executor.extraJavaOptions=-javaagent:/home/rvenka21/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReporter --conf spark.driver.extraJavaOptions=-javaagent:/home/rvenka21/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.ConsoleOutputReporter --class Main --executor-cores 8 --executor-memory 20G /oasis/projects/nsf/uic367/rvenka21/Genomics_EpiQuant/SPAEML/target/SPAEML-0.0.1-jar-with-dependencies.jar StepwiseModelSelection --epiq /user/input/SNP.200.Sample.300.Genotype.epiq -P /user/input/SNP.200.Sample.300.Phenotype.epiq -o /user/input/cluster_mode ","appId":null,"name":"[email protected]","host":"comet-03-02","processUuid":"bca1b961-e27a-42bd-ad57-bedbb8d4c095","agentVersion":"1.0.0","appClass":"Main","xmxBytes":21474836480,"appJar":null} 1554139519286 com.uber.profiling.AgentImpl: Finished one time profiler: com.uber.profiling.profilers.ProcessInfoProfiler@5427c60c

    With Regards, Ram

    opened by ramshankar1990 26
  • Improve yaml property access

    Improve yaml property access

    It will be better if yaml properties can be accessed using dot (".") notation. Current implementation stores Map and List from yaml in String format which is not very convenient while using these properties. Consider below yaml properties.

    key1: value1
    key3:
        key3a: value3a
        key3b:
        - value3b
        - value3c
    override:
      override1: 
        key1: value11
        key3:
          key3a: value33a
    

    Currently YamlConfigProvider stores them in Map<String, Map<String, List<String>>> which is like below.

    {
    		 = {
    		key1 = [value1],
    		key3 = [{
    				key3a = value3a,
    				key3b = [value3b, value3c]
    			}
    		]
    	},
    	override1 = {
    		key1 = [value11],
    		key3 = [{
    				key3a = value33a
    			}
    		]
    	}
    

    The proposed change will store them in same Map<String, Map<String, List<String>>> which will be like below.

    {
    		 = {
    		key1 = [value1],
    		key3.key3a = [value3a],
    		key3.key3b[0] = [value3b],
    		key3.key3b[1] = [value3c]
    	},
    	override1 = {
    		override.override1.key1 = [value11],
    		override.override1.key3.key3a = [value33a]
    	}
    }
    

    This is similar format how Spring loads yaml file. This change will still store the values in List<String> so it won't break existing functionalities. I have updated YamlConfigProviderTest class for this change.

    opened by baghelamit 12
  • Error opening zip file or JAR manifest missing : jvm-profiler-1.0.0.jar

    Error opening zip file or JAR manifest missing : jvm-profiler-1.0.0.jar

    not working on spark

    Container: container_e300_1588140516225_2267_01_000003 on sz-5-centos44_8041

    LogType:stderr Log Upload Time:Fri May 22 15:36:26 +0800 2020 LogLength:72 Log Contents: Error opening zip file or JAR manifest missing : jvm-profiler-1.0.0.jar

    LogType:stdout Log Upload Time:Fri May 22 15:36:26 +0800 2020 LogLength:84 Log Contents: Error occurred during initialization of VM agent library failed to init: instrument

    spark-default.conf

    spark.jars=hdfs://my_domain/DW/app/jars/jvm-profiler-1.0.0.jar spark.executor.extraJavaOptions=-javaagent:jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.KafkaOutputReporter,metricInterval=5000,brokerList=10.201.5.57:9092,topicPrefix=monitor.spark.

    opened by foxinmy 8
  • java.lang.NoSuchMethodError: okio.ByteString.encodeString with Spark/InfluxDB

    java.lang.NoSuchMethodError: okio.ByteString.encodeString with Spark/InfluxDB

    When using the InfluxDB reporter on Spark 2.2.0 with Ambari HDP, I'm getting the following error.

    I ran mvn -P influxdb clean package to build the jar.

    Using the following command (with classname / host replaced):

    spark-submit --master yarn-cluster --class com.output.spark.FilteringJob --conf spark.jars=hdfs:///user/smorgasborg/lib/jvm-profiler-1.0.0.jar --conf spark.executor.extraJavaOptions=-javaagent:jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.InfluxDBOutputReporter,tag=profiling,sampleInterval=1000,influxdb.host={{HOST HERE}},influxdb.port=8086,influxdb.database=test_profiling --conf spark.yarn.am.waitTime=200s spark-output-assembly.jar

    [WARNING] 1544111654753 com.uber.profiling.ProfilerRunner: Failed to run profile: com.uber.profiling.profilers.StacktraceReporterProfiler@b9afc07 java.lang.NoSuchMethodError: okio.ByteString.encodeString(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;
    	at okhttp3.Credentials.basic(Credentials.java:35)
    	at okhttp3.Credentials.basic(Credentials.java:30)
    	at ujagent_shaded.org.influxdb.impl.BasicAuthInterceptor.<init>(BasicAuthInterceptor.java:15)
    	at ujagent_shaded.org.influxdb.impl.InfluxDBImpl.<init>(InfluxDBImpl.java:153)
    	at ujagent_shaded.org.influxdb.impl.InfluxDBImpl.<init>(InfluxDBImpl.java:122)
    	at ujagent_shaded.org.influxdb.impl.InfluxDBImpl.<init>(InfluxDBImpl.java:185)
    	at ujagent_shaded.org.influxdb.InfluxDBFactory.connect(InfluxDBFactory.java:48)
    	at com.uber.profiling.reporters.InfluxDBOutputReporter.ensureInfluxDBCon(InfluxDBOutputReporter.java:148)
    	at com.uber.profiling.reporters.InfluxDBOutputReporter.report(InfluxDBOutputReporter.java:57)
    	at com.uber.profiling.profilers.StacktraceReporterProfiler.profile(StacktraceReporterProfiler.java:118)
    	at com.uber.profiling.ProfilerRunner.run(ProfilerRunner.java:38)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at java.lang.Thread.run(Thread.java:745)
    
    opened by yeenow123 8
  • [Feature] Support reload class when use VirtualMachine#loadAgent

    [Feature] Support reload class when use VirtualMachine#loadAgent

    My Test Evidence

    Test Steps

    1. Create a test class to dynamic attach target process. eg, RunAttachProfiler.java
    2. Run HelloWorldApplication class.
    3. Update process id in RunAttachProfiler.java and run RunAttachProfiler class.
    4. We can see the result in the picture below.

    Before my modification, i can not see the result.

    image

    opened by leozhiyu 6
  • Documentation for metrics collected

    Documentation for metrics collected

    Summary:

    This ticket is a suggestion for improving the documentation by adding a description of the metrics collected by the profiler.

    Details:

    As noted in https://github.com/uber-common/jvm-profiler/issues/50, there is currently no documentation describing the metrics that are collected. Adding a description of what each collected metric represents to the documentation might add value by:

    1. Creating a quick reference for developers.
    2. Increasing the usability of the repository/profiler.

    The recommendation is to add something along the lines of the sample below.

    | Name | Description | Sample Value | Note | |--------------------------------------------------------|-----------------------------------------------------------------|----------------------------------------------|---------------------------------------------------------------------------------------| |bufferPools-direct-totalCapacity |Available capacity in bytes in the direct buffer pool. |18949 |Capacity should be similar to memoryUsed for a healthy JVM. | |gc-PSMarkSweep-collectionCount |Total number of collections that have occurred for PS MarkSweep. |7 |-1 if collection count is undefined for this collector. |

    Relevant Branch:

    I have started some work on this, which can be found here. The information provided in the mark-down is based on the source code of the profiler, the java.lang documentation of the APIs that are used by the profiler and personal knowledge.

    The documentation linked above is incomplete since I wanted to ensure that this change is acceptable before spending more time on it.

    opened by m-vemuri 6
  • Cross Node Communication

    Cross Node Communication

    Hi, I have been using Uber JVM profiler for profiling my Spark applications. May I know if the profiler provides information on cross node communication?

    opened by rawlani 6
  • [Feature] Adding ThreadMXBean information in the profiler #Issue52

    [Feature] Adding ThreadMXBean information in the profiler #Issue52

    As per the discussion on #52, adding Support for Collecting Some stats related to JVM Threads.

    1. A new Profiler called ThreadInfoProfiler is added which makes use of ThreadMXBean to Collect and report the Stats.
    2. Unit Tests for the same are added.

    The Metric Looks like the following:

    ConsoleOutputReporter - ThreadInfo: {"liveThreadCount":6,"appId":null,"name":"[email protected]","host":"MacBook-Pro.local","processUuid":"923a1e00-1413-4fd5-800b-08764ea1faaf","totalThreadCount":6,"epochMillis":1601806705706,"tag":"mytag","peakThreadCount":6,"newThreadCount":0}
    

    Please review and let me know if I have missed anything.

    opened by rahul26goyal 5
  • AssertionError: Malformated json. 'stacktrace' key doesn't exist.

    AssertionError: Malformated json. 'stacktrace' key doesn't exist.

    Hi @viirya ,

    Sorry for any inconvenience.

    I am trying to run Spark in the local mode, along with the JVM profiler, however, I encounter some issue when trying to generate flamegraph of Stacktrack Profiling result. I would appreciate if you can provide some suggestions, thank you.

    Best regards,

    Run Spark along with the JVM profiler: cch:target cch$ spark-submit --class com.github.ehiggs.spark.terasort.TeraSort --conf "spark.driver.extraJavaOptions=-javaagent:/Users/cch/eclipse-workspace/jvm-profiler/target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.FileOutputReporter,ioProfiling=true,outputDir=/Users/cch/Downloads/Stacktrace.json" --conf "spark.executor.extraJavaOptions=-javaagent:/Users/cch/eclipse-workspace/jvm-profiler/target/jvm-profiler-1.0.0.jar=reporter=com.uber.profiling.reporters.FileOutputReporter,ioProfiling=true,outputDir=/Users/cch/Downloads/Stacktrace.json" /Users/cch/eclipse-workspace/spark-terasort/target/spark-terasort-1.1-SNAPSHOT-jar-with-dependencies.jar /Users/cch/Downloads/terasort_in /Users/cch/Downloads/terasort_out

    Generate flamegraph of Stacktrack Profiling result:

    cch:target cch$ python /Users/cch/eclipse-workspace/jvm-profiler/stackcollapse.py -i /Users/cch/Downloads/Stacktrace.json/CpuAndMemory.json > /Users/cch/Downloads/StacktraceOut/CpuAndMemory.folded
    Traceback (most recent call last):
      File "/Users/cch/eclipse-workspace/jvm-profiler/stackcollapse.py", line 17, in <module>
        assert 'stacktrace' in stacktraceLog, "Malformated json. 'stacktrace' key doesn't exist."
    AssertionError: Malformated json. 'stacktrace' key doesn't exist.
    

    Stacktrace.zip

    opened by cchung100m 5
  • Need help to use it in the apache karaf/service mix enviroments

    Need help to use it in the apache karaf/service mix enviroments

    Hi, We are trying to integrate the jvm-profile in the service mix/apache karaf environment. when we try to use method duration profiler, we got below error.however by default cpuandMemory profiler is working.

    java.lang.NoClassDefFoundError: com/uber/profiling/transformers/MethodProfilerStaticProxy

    opened by vMuvvala459 5
  • Add FlattenKafkaOutputReporter

    Add FlattenKafkaOutputReporter

    FlattenKafkaOutputReporter: a custom KafkaOutputReporter This reporter will transform metrics as key=value output format before sending them to Kafka.

    1. It would be useful in case you want to report the metrics into Kafka -> consume those metrics somewhere & then write to InfluxDB indirectly.
    2. Use in case your JVM machine vs the influxdb instance are hosted in the different cluster or different network.
    opened by hoaihuongbk 4
  • How to trace the HDFS file paths each Spark application reads or writes and identify hot files for further optimization?

    How to trace the HDFS file paths each Spark application reads or writes and identify hot files for further optimization?

    • It could also trace the HDFS file paths each Spark application reads or writes and identify hot files for further optimization.

    i found that description.. and then?

    opened by guoamocker 0
  • Analytics on the metrics

    Analytics on the metrics

    Hi folks, It would be great if Uber can open source their analytics framework or at least write a blog on how to use the collected metrics to tune the job, like which config is being tuned and what is the thought process behind the decision making.

    Thanks

    opened by nownikhil 0
  • Add support for custom user defined metrics

    Add support for custom user defined metrics

    We should add support for custom user defined metrics. We could add a drop-wizard profiler.

    This is quite useful as it allows a single library for metrics.

    opened by academy-codex 0
  • durationProfiling and ioProfiling for spark application

    durationProfiling and ioProfiling for spark application

    Hi Team,

    1. I am running spark application written in scala. I am not able to do durationProfiling for scala class. Can you please help with this?
    2. Regarding ioProfiling, How to do it with HDFS data read and write metrics. From IO metrics captured, I am not able to clearly understand that how much data read and write from HDFS

    It will be good if anyone has any example related to how to use it with spark and HDFS Thanks, Sohil Raghwani

    opened by sohilgithub 0
  • Ability to Specify Thresholds for metrics and report it.

    Ability to Specify Thresholds for metrics and report it.

    Currently, we report all the metrics at a scheduled interval and it ends up creating a lot of noisy data. Would it be better to only report metrics after a given Threshold is Breached? Example: Report HeapUsed when its > 60% heap Max. Report GC when the time spent is more than X.

    opened by rahul26goyal 1
  • unable to load cache item

    unable to load cache item

    I find the usage of this tool somewhat limiting. Can you call out the limitations of this framework in the README please. appreciate it.

    for example see below stack trace. what is it about ?

    Caused by: java.lang.IllegalStateException: Unable to load cache item at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:79) at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:134) at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:319) at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:569) at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:416) at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:58) at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205) ... 42 common frames omitted Caused by: java.lang.VerifyError: (class: com/optum/voyager/core/persistence/service/repository/HL7ResourceRepository$$EnhancerBySpringCGLIB$$18453215, method: findHL7Resource signature: (Ljava/lang/String;Ljava/util/UUID;Lcom/optum/voyager/datamodel/enums/HL7ResourceType;)Lcom/optum/voyager/core/persistence/service/entity/HL7Resource;) Inconsistent stack height 2 != 1 at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348)

    opened by Vkodthiv 2
Owner
Uber Common
Uber's open source utility libraries
Uber Common
An application metrics facade for the most popular monitoring tools. Think SLF4J, but for metrics.

Micrometer Application Metrics An application metrics facade for the most popular monitoring tools. Instrument your code with dimensional metrics with

Micrometer Metrics 3.7k Dec 30, 2022
Java memory allocation profiler

Aprof - Java Memory Allocation Profiler What is it? The Aprof project is a Java Memory Allocation Profiler with very low performance impact on profile

Devexperts 211 Dec 15, 2022
Sampling CPU and HEAP profiler for Java featuring AsyncGetCallTrace + perf_events

async-profiler This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specifi

null 5.8k Jan 3, 2023
Java monitoring for the command-line, profiler included

jvmtop is a lightweight console application to monitor all accessible, running jvms on a machine. In a top-like manner, it displays JVM internal metri

null 1.2k Jan 6, 2023
Turn -XX:+TraceBytecodes output into a FlameGraph compatible stack format

A tool to turn the output of -XX:+TraceBytecodes (a JDK debug-only feature to print every bytecode executed by the interpreter) into a simple stack fo

Claes Redestad 34 Dec 11, 2022
Inspect pmap -X output of a java process, requires Java11, likely not 100% accurate

java-pmap-inspector Inspect pmap -X output of a java process, requires Java 11, likely not 100% accurate. Usage examples $ pmap -X pid > pmap.txt; jav

Brice Dutheil 7 Jul 6, 2022
面向开发人员、声明式的 Metrics 采集与监控系统,可以对结构化与非结构化、有界数据与无界数据进行采集,通过对采集数据进行提取、过滤、逻辑运算等处理后将结果存储流行的监控系统或存储引擎中(如 Prometheus、Nightingale、Open-Falcon)从而搭建起完整的监控体系,同时也可以结合 grafana 完成数据的可视化

介绍 AnyMetrics - 面向开发人员、声明式的 Metrics 采集与监控系统,可以对结构化与非结构化、有界数据与无界数据进行采集,通过对采集数据进行提取、过滤、逻辑运算、聚合等处理后将结果存储流行的监控系统或存储引擎中(如 Prometheus、Nightingale、Open-Falco

lichao 6 Aug 16, 2021
A sidecar to run alongside Trino to gather metrics using the JMX connector and expose them in different formats using Apache velocity

Overview A sidecar to run alongside Trino to gather metrics using the JMX connector and expose them in different formats using Apache Velocity. Click

BlueCat Engineering 4 Nov 18, 2021
Tools for tracking down memory / JVM problems & generating predictable-as-possible VM behaviour

Hawkshaw Tools for tracking down memory / JVM problems & generating predictable-as-possible VM behaviour You can Use Hawkshaw to mimic application obj

Martijn Verburg 40 Jan 9, 2021
production heap profiling for the JVM. compatible with google-perftools.

Heapster Heapster provides an agent library to do heap profiling for JVM processes with output compatible with Google perftools. The goal of Heapster

marius a. eriksen 392 Dec 27, 2022
Sends stacktrace-level performance data from a JVM process to Riemann.

Riemann JVM Profiler riemann-jvm-profiler is a JVM agent that you can inject into any JVM process--one written in Clojure, Java, Scala, Groovy, etc.--

Riemann 288 Sep 21, 2022
Small set of tools for JVM troublshooting, monitoring and profiling.

Swiss Java Knife (SJK) SJK is a command line tool for JVM diagnostic, troubleshooting and profiling. SJK exploits standard diagnostic interfaces of JV

Alexey Ragozin 3.2k Jan 3, 2023
A driver to allow deep interaction with the JVM without any restrictions

ToolFactory JVM Driver A driver to allow deep interaction with the JVM without any restrictions. To include ToolFactory JVM Driver in your projects si

ToolFactory 34 Oct 8, 2022
Kotlin-decompiled - (Almost) every single language construct of the Kotlin programming language compiled to JVM bytecode and then decompiled to Java again for better readability

Kotlin: Decompiled (Almost) every single language construct of the Kotlin programming language compiled to JVM bytecode and then decompiled to Java ag

The Self-Taught Software Engineer 27 Dec 14, 2022
Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence

Jazzer is a coverage-guided, in-process fuzzer for the JVM platform developed by Code Intelligence. It is based on libFuzzer and brings many of its instrumentation-powered mutation features to the JVM.

Code Intelligence 696 Jan 5, 2023
Dynamic loading and compiling project based on JVM

camphor 基于jvm的弹性加载及编译中间件(Elastic loading and compiling middleware based on JVM) camphor_0.0.1 项目简介 该项目定位为弹性中间件,能够使系统在不重启的情况下完成增量代码文件的动态编译和加载 模块介绍 camp

palading 1 Jan 22, 2022
JavaOTTF - Official OTTF parser and composer for JVM languages

JavaOTTF Official OTTF parser and composer for JVM languages. Documentation Please refer to the Wiki Section. Installation Maven Add repository into p

Open Timetable 2 Nov 21, 2022
chardetng for the JVM

chardetng_j This is chardetng compiled for the JVM using asmble. Licensing Please see the file named COPYRIGHT. TL;DR: Apache-2.0 OR MIT Disclaimer Th

Henri Sivonen 1 Oct 18, 2021
JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines.

JVM Explorer JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines. Features Browse

null 109 Nov 30, 2022