Skip to content

Instantly share code, notes, and snippets.

@DaGeRe
Last active October 23, 2024 05:11
Show Gist options
  • Select an option

  • Save DaGeRe/0fc0080b1f35e6d892135b3d094fa685 to your computer and use it in GitHub Desktop.

Select an option

Save DaGeRe/0fc0080b1f35e6d892135b3d094fa685 to your computer and use it in GitHub Desktop.
Instrument t2 Project With Kieker

Starting with Kieker Instrumentation

  • Download the spring instrument library: wget https://repo1.maven.org/maven2/org/springframework/spring-instrument/6.1.14/spring-instrument-6.1.14.jar
  • Kieker 2.0.2-SNAPSHOT is currently in the repo. If Kieker should be updated, please the following lines to the dependencies in the main build.gradle:
  aspectJarConfig "ch.qos.logback:logback-classic:$libLogbackVersion"
  aspectJarConfig "ch.qos.logback:logback-core:$libLogbackVersion"
  • Build: mvn clean package -DskipTests=true
  • Start: java -Dkieker.monitoring.writer.filesystem.FileWriter.customStoragePath=monitoring-logs -Dkieker.monitoring.skipDefaultAOPConfiguration=true -javaagent:spring-instrument-6.1.14.jar -javaagent:kieker-2.0.2-SNAPSHOT-aspectj.jar -jar target/t2-modulith.war

Analysis

To analyse the value, please go to your Kieker folder, go to tools/trace-analysis-new/ and execute the following steps:

  • ../../gradlew assemble -x check -x test
  • cd build/distributions/
  • unzip trace-analysis-new-2.0.2-SNAPSHOT.zip
  • bin/trace-analysis-new -i /home/reichelt/nvme/workspaces/kiekerworkspace/t2/t2-project/modulith/monitoring-logs/kieker-20241022-195751-5374462925574-UTC--KIEKER-SINGLETON -o $(pwd) --plot-Deployment-Component-Dependency-Graph responseTimes-ms --plot-Deployment-Operation-Dependency-Graph responseTimes-ms --plot-Aggregated-Deployment-Call-Tree --plot-Aggregated-Assembly-Call-Tree
  • for file in *.dot; do dot -Tpng $file -o $file.png; done

This should give you a visualization of the call tree and the dependencies of the method executions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment