Skip to content

Commit 28f1b15

Browse files
committed
integrate with spring native
1 parent 28ef04e commit 28f1b15

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

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/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)