Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit 3f1b782

Browse files
committed
Add java-spring to scrape target in demo
1 parent 8956e0b commit 3f1b782

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

tools/docker-compose/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ services:
5353
cap_add:
5454
- SYS_ADMIN
5555
ports:
56-
- 8083:4001
56+
- 8083:8080
5757
networks:
5858
- phlare
5959
java-springboot:

tools/docker-compose/java/simple/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ COPY . .
66

77
RUN ./gradlew clean build
88

9-
EXPOSE 4001
9+
EXPOSE 8080
1010

1111
CMD ["./gradlew", "run"]

tools/docker-compose/java/simple/src/main/java/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static void main(String[] args) throws Exception {
1111
var t = new Thread(new Something());
1212
t.start();
1313

14-
var server = HttpServer.create(new InetSocketAddress(4001), 0);
14+
var server = HttpServer.create(new InetSocketAddress(8080), 0);
1515
server.createContext("/", new PprofHttpHandler());
1616
server.start();
1717
}

tools/docker-compose/phlare.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ scrape_configs:
2727
goroutine: { enabled: false }
2828
memory: { enabled: false }
2929
mutex: { enabled: false }
30+
- job_name: "cp-java-springboot"
31+
scrape_interval: "15s"
32+
static_configs:
33+
- targets: ["java-springboot:8080"]
34+
profiling_config:
35+
pprof_config:
36+
block: { enabled: false }
37+
goroutine: { enabled: false }
38+
memory: { enabled: false }
39+
mutex: { enabled: false }
3040
- job_name: "cp-python"
3141
scrape_interval: "15s"
3242
static_configs:

0 commit comments

Comments
 (0)