https://github.com/getappmap/appmap-java
AppMap client agent for Java
https://github.com/getappmap/appmap-java
Last synced: about 2 months ago
JSON representation
AppMap client agent for Java
- Host: GitHub
- URL: https://github.com/getappmap/appmap-java
- Owner: getappmap
- License: other
- Created: 2019-09-23T17:08:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-02T17:46:19.000Z (7 months ago)
- Last Synced: 2024-11-04T09:06:20.374Z (5 months ago)
- Language: Java
- Homepage:
- Size: 1.34 MB
- Stars: 82
- Watchers: 6
- Forks: 16
- Open Issues: 61
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-java - AppMap
README
- [About](#about)
- [Usage](#usage)
- [Development](#development)
- [Building](#building)
- [Testing](#testing)# About
`appmap-java` is a Java agent for recording
[AppMaps](https://github.com/getappmap/appmap) of your code. "AppMap" is a data
format which records code structure (modules, classes, and methods), code
execution events (function calls and returns), and code metadata (repo name,
repo URL, commit SHA, labels, etc). It's more granular than a performance
profile, but it's less granular than a full debug trace. It's designed to be
optimal for understanding the design intent and structure of code and key data
flows.# Usage
Visit the [AppMap for Java](https://appmap.io/docs/reference/appmap-java.html)
reference page on AppLand.com for a complete reference guide.# Development
[](https://travis-ci.com/getappmap/appmap-java)
The [Spring PetClinic](https://github.com/spring-projects/spring-petclinic)
provides a convenient way to develop on `appmap-java`.Obtain the `spring-petclinic` JAR file, and launch it with the AppLand Java
agent:```sh
export PETCLINIC_DIR=
java -Dappmap.debug \
-javaagent:build/libs/appmap.jar \
-Dappmap.config.file=test/appmap.yml \
-jar $(PETCLINIC_DIR)/target/spring-petclinic-2.2.0.BUILD-SNAPSHOT.jar
```You can use Java remote debug settings to attach a debugger:
```sh
export PETCLINIC_DIR=
java -Dappmap.debug \
-javaagent:build/libs/appmap.jar \
-Dappmap.config.file=test/appmap.yml \
-Xdebug \
-Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=y \
-jar $PETCLINIC_DIR/target/spring-petclinic-2.2.0.BUILD-SNAPSHOT.jar
```## Building
Artifacts will be written to `build/libs`. Use `appmap.jar` as your agent.
```sh
./gradlew build
```## Testing
## Unit tests
Unit tests are run with `./gradlew test`.
## Integration tests
The integration tests use [bats](https://github.com/sstephenson/bats) and Docker.
Run the following command:
```sh
./bin/test
```To get an interactive shell to write/debug the tests, try:
```shell
./bin/test /bin/bash
```Once in the shell, run:
```shell
DEBUG_JSON=true bats --tap /test/*.bats
```Or:
```shell
DEBUG_JSON=true bats --tap /test/*.bats -f 'http'
```