Initial updates
This commit is contained in:
4
pinpoint-agent-attach-example/java/.env
Normal file
4
pinpoint-agent-attach-example/java/.env
Normal file
@@ -0,0 +1,4 @@
|
||||
### Pinpoint with Java
|
||||
PINPOINT_VERSION=1.7.2
|
||||
AGENT_ID=app-in-docker
|
||||
APP_NAME=quickapp
|
||||
15
pinpoint-agent-attach-example/java/Dockerfile
Normal file
15
pinpoint-agent-attach-example/java/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM java:8
|
||||
|
||||
LABEL maintainer="Roy Kim <roy.kim@navercorp.com>"
|
||||
|
||||
ARG PINPOINT_VERSION
|
||||
ARG AGENT_ID
|
||||
ARG APP_NAME
|
||||
ENV JAVA_OPTS="-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME}"
|
||||
|
||||
RUN mkdir -p javasample
|
||||
COPY build/Sample.java javasample
|
||||
WORKDIR javasample
|
||||
|
||||
RUN javac Sample.java
|
||||
CMD java ${JAVA_OPTS} Sample
|
||||
14
pinpoint-agent-attach-example/java/build/Sample.java
Normal file
14
pinpoint-agent-attach-example/java/build/Sample.java
Normal file
@@ -0,0 +1,14 @@
|
||||
public class Sample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Sample Java Start");
|
||||
try {
|
||||
while (true) {
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
}
|
||||
catch (java.lang.InterruptedException e) {
|
||||
System.out.println("Test Finished");
|
||||
}
|
||||
}
|
||||
}
|
||||
21
pinpoint-agent-attach-example/java/docker-compose.yml
Normal file
21
pinpoint-agent-attach-example/java/docker-compose.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
version: "2.1"
|
||||
|
||||
services:
|
||||
java:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- PINPOINT_VERSION=${PINPOINT_VERSION}
|
||||
- AGENT_ID=${AGENT_ID}
|
||||
- APP_NAME=${APP_NAME}
|
||||
container_name: "java"
|
||||
image: "Your Image"
|
||||
|
||||
volumes_from:
|
||||
- container:pinpoint-agent
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: pinpoint-agent_pinpoint
|
||||
Reference in New Issue
Block a user