@@ -53,15 +53,20 @@ This will also use the [docker-compose.yml](./docker-compose.yml) file to start
53
53
through the user of Spring Boot's
54
54
[ docker compose support] ( https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.docker-compose ) .
55
55
56
- Alternatively, and more akin to how you would run the application in production, you can run the application with java overriding the
57
- ` spring.datasource.* ` and ` spring.activemq.* ` properties to point at an already running postgres database. The example below does this
58
- through the use of environment variables to point at a postgres database running in Docker.
56
+ Alternatively, and more akin to how you would run the application in production, you can run the application with java overriding
57
+ the ` spring.datasource.* ` , ` spring.activemq.* ` and ` *.otlp. ` properties to point at an already running Postgres database,
58
+ ActiveMQ instance and OpenTelemety endpoint respectively. The example below does this through the use of environment variables to
59
+ point at a Postgres database etc, running in Docker.
59
60
60
61
``` shell
61
62
$ SPRING_DATASOURCE_URL=jdbc:postgresql://127.0.0.1:5432/spt-development-demo \
62
63
SPRING_DATASOURCE_USERNAME=postgres \
63
64
SPRING_DATASOURCE_PASSWORD=p@ssw0rd \
64
65
SPRING_ACTIVEMQ_BROKER_URL=tcp://localhost:61616 \
66
+ MANAGEMENT_OTLP_METRICS_EXPORT_URL=http://localhost:4318/v1/metrics \
67
+ OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=http://localhost:4318/v1/logs \
68
+ OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://localhost:4318/v1/metrics \
69
+ OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4318/v1/traces \
65
70
java -jar target/spt-development-demo-0.0.1-SNAPSHOT.jar
66
71
```
67
72
0 commit comments