Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 5 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,8 @@
# Modified Spring Pet Clinic for testing NR's CLM
# CodeStream Demo Repository

## Getting the app running with docker
Be sure to refer to the [CodeStream Demo Setup & Script](https://docs.google.com/document/d/1_TF6-McJ5TIMAs-ajnBTnMSMRfpR9oapoi16StCPLLs/edit?usp=sharing) document, and help is always available in the [#codestream-demo-setup](https://newrelic.enterprise.slack.com/archives/C04RAE53YDD) channel on Slack.

```
git clone https://github.com/meiao/spring-petclinic.git
cd spring-petclinic
NEW_RELIC_LICENSE_KEY=12345 docker-compose up -d --build
```
Open the following files before you start your demo.

Agent, tester, and app logs can be found mounted in ./logs

The docker app will generate some traffic that should be visible in NR1 under "CLM Test App"

## Getting the code and running without docker

```
git clone https://github.com/meiao/spring-petclinic.git
cd spring-petclinic
NEW_RELIC_LICENSE_KEY=12345 ./gradlew bootRun
```
Substitute 12345 with your New Relic license key.

You can then access petclinic here:
- react: http://localhost:8081/react
- legacy app: http://localhost:8081/

The main page will have some links that exercise auto and manual instrumentation in different modes.

The respective code is in ClmController.java.

The top menu will take you to the regular Spring Pet Clinic application.

Requires Java 11 or higher.
- [ClmController.java](src/java-spring-demogorgon/src/main/java/org/springframework/samples/petclinic/clm/ClmController.java)
- [demo_queries.nrql](demo_queries.nrql)
19 changes: 19 additions & 0 deletions demo_queries.nrql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// table example

FROM Transaction SELECT *

// billboard example

FROM Transaction SELECT count(*)

// line example

FROM Transaction SELECT count(*) TIMESERIES

// multi-line example

FROM Transaction SELECT average(duration) * count(*) facet name TIMESERIES

// json example

FROM Transaction SELECT count(*) facet name TIMESERIES
Loading