Skip to content

Commit bfcf311

Browse files
committed
integrate with spring native
1 parent 4019099 commit bfcf311

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

.mise/tasks/oats-tests.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ pushd spring-declarative-configuration
1515
../gradlew clean bootJar
1616
popd
1717

18-
oats -timeout 5m logging-k8s-stdout-otlp-json/
19-
oats -timeout 5m javaagent-declarative-configuration/oats/
20-
oats -timeout 5m spring-declarative-configuration/oats/
18+
# timeout for each test suite is 5 minutes
19+
oats -timeout 5m .

spring-declarative-configuration/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,28 @@ If issues persist, compare your configuration to:
250250
- The Java Agent example in [`javaagent-declarative-configuration`](../javaagent-declarative-configuration)
251251
- The reference schemas and examples in
252252
[opentelemetry-configuration](https://github.com/open-telemetry/opentelemetry-configuration)
253+
254+
## Follow-up: applying the same pattern to Spring Native
255+
256+
As a follow-up, you can reuse the ideas from this module to extend the `spring-native` example
257+
with declarative configuration and a Collector running via Docker Compose:
258+
259+
- Start from the `spring-native` module in this repository.
260+
- delete the `application.properties` file in `spring-native/src/main/resources/`
261+
- copy `application.yaml` from this module to `spring-native/src/main/resources/`
262+
- add the settings from `application.properties` back into that `application.yaml`
263+
- follow the instructions in [spring-native/README.md](../spring-native/README.md) to run with
264+
Docker Compose
265+
266+
```shell
267+
rm ../spring-native/src/main/resources/application.properties
268+
cp src/main/resources/application.yaml ../spring-native/src/main/resources/
269+
echo "spring:
270+
datasource:
271+
url: jdbc:h2:mem:db
272+
management:
273+
endpoints:
274+
web:
275+
exposure:
276+
include: '*'" >> ../spring-native/src/main/resources/application.yaml
277+
```

spring-native/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import org.springframework.boot.gradle.plugin.SpringBootPlugin
22

33
plugins {
44
id("java")
5-
id("org.springframework.boot") version "3.5.7"
5+
id("org.springframework.boot") version "3.5.8"
66
id("org.graalvm.buildtools.native") version "0.11.3"
77
}
88

spring-native/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.8'
21
services:
32
app:
43
image: otel-native-graalvm

0 commit comments

Comments
 (0)