Skip to content

Commit e72a958

Browse files
committed
Rename sdk-migration-config.yaml, demonstrate config of single instrumentation rather than an exhaustive list
1 parent dc33e52 commit e72a958

File tree

5 files changed

+280
-389
lines changed

5 files changed

+280
-389
lines changed

javaagent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ By default, this example uses the [environment variable configuration schema](ht
5252
To use file configuration instead of the environment variable scheme, add the following before starting the application and collector:
5353

5454
```shell
55-
export OTEL_EXPERIMENTAL_CONFIG_FILE=/sdk-config.yaml
55+
export OTEL_EXPERIMENTAL_CONFIG_FILE=/sdk-migration-config.yaml
5656
```
5757

5858
Note that toggling file configuration causes the environment variable configuration scheme to be ignored completely. However, there is support for environment variable substitution within configuration files.

javaagent/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies {
2525
implementation("org.springframework.boot:spring-boot-starter-web")
2626

2727
agent("io.opentelemetry.javaagent:opentelemetry-javaagent:2.9.0")
28-
:w}
28+
}
2929

3030
val copyAgent = tasks.register<Copy>("copyAgent") {
3131
from(agent.singleFile)

javaagent/docker-compose.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ services:
44
build: ./
55
environment:
66
OTEL_SERVICE_NAME: "agent-example-app"
7-
OTEL_EXPORTER_OTLP_ENDPOINT: "http://collector:4318"
7+
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "http://collector:4318/v1/traces"
8+
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: "http://collector:4318/v1/metrics"
9+
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: "http://collector:4318/v1/logs"
810
# Logs are disabled by default
911
OTEL_LOGS_EXPORTER: "otlp"
1012
# Optional specify file configuration instead of using environment variable scheme
11-
# To use, call "export OTEL_EXPERIMENTAL_CONFIG_FILE=/sdk-config.yaml" before calling docker compose up
12-
OTEL_EXPERIMENTAL_CONFIG_FILE: /sdk-config.yaml
13+
# To use, call "export OTEL_EXPERIMENTAL_CONFIG_FILE=/sdk-migration-config.yaml" before calling docker compose up
14+
OTEL_EXPERIMENTAL_CONFIG_FILE: /sdk-migration-config.yaml
1315
ports:
1416
- "8080:8080"
1517
volumes:
16-
- ./sdk-config.yaml:/sdk-config.yaml
18+
- ./sdk-migration-config.yaml:/sdk-migration-config.yaml
1719
depends_on:
1820
- collector
1921
collector:

0 commit comments

Comments
 (0)