Skip to content

Commit 692e0f2

Browse files
committed
cleanup javaagent example
1 parent d8b3a7b commit 692e0f2

6 files changed

Lines changed: 2 additions & 282 deletions

File tree

doc-snippets/extensions-minimal/oats/docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ services:
77
environment:
88
OTEL_SERVICE_NAME: "extensions-minimal-test-app"
99
OTEL_EXPORTER_OTLP_ENDPOINT: http://lgtm:4318
10-
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://lgtm:4318/v1/traces
11-
OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf
1210
ports:
13-
- "8080:8080"
11+
- "8080:8080"

doc-snippets/spring-starter/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ dependencies {
2020
implementation("org.springframework.boot:spring-boot-starter-web")
2121
implementation("org.springframework.boot:spring-boot-starter-webflux")
2222
implementation("io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter")
23-
implementation("io.opentelemetry.contrib:opentelemetry-samplers:1.51.0-alpha")
2423
}
2524

2625
springBoot {

javaagent/README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,3 @@ curl http://localhost:8080/ping
4444
```
4545

4646
Watch for spans, metrics, and logs in the Collector log output.
47-
48-
## Declarative Configuration
49-
50-
By default, this example uses the [environment variable configuration schema](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md) to configure the SDK. However, it also includes [sdk-config.yaml](./sdk-config.yaml) which demonstrates how the [declarative configuration](https://opentelemetry.io/docs/specs/otel/configuration/#declarative-configuration) scheme can be used to configure the SDK based on a YAML configuration file instead.
51-
52-
`sdk-config.yaml` extends the [opentelemetry-configuration sdk-config.yaml](https://github.com/open-telemetry/opentelemetry-configuration/blob/v0.3.0/examples/sdk-config.yaml) template, demonstrating:
53-
54-
- Configuration of instrumentation (see `.instrumentation.java`)
55-
- Configuration of [rule-based routing sampler](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/samplers) (see `.tracer_provider.sampler.parent_based.root`)
56-
57-
To use declarative configuration instead of the environment variable scheme, add the following before starting the application and Collector:
58-
59-
```shell
60-
export OTEL_EXPERIMENTAL_CONFIG_FILE=/sdk-config.yaml
61-
```
62-
63-
Note: toggling declarative configuration causes the env var configuration scheme to be ignored completely. However, there is support for [env var substitution](https://opentelemetry.io/docs/specs/otel/configuration/data-model/#environment-variable-substitution) within configuration files.

javaagent/docker-compose.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,9 @@ services:
44
build: ./
55
environment:
66
OTEL_SERVICE_NAME: "agent-example-app"
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"
10-
# Logs are disabled by default
11-
OTEL_LOGS_EXPORTER: "otlp"
12-
# Optional specify file configuration instead of using environment variable scheme
13-
# To use, call "export OTEL_EXPERIMENTAL_CONFIG_FILE=/sdk-config.yaml" before calling docker compose up
14-
OTEL_EXPERIMENTAL_CONFIG_FILE:
7+
OTEL_EXPORTER_OTLP_ENDPOINT: "http://collector:4318"
158
ports:
169
- "8080:8080"
17-
volumes:
18-
- ./sdk-config.yaml:/sdk-config.yaml
1910
depends_on:
2011
- collector
2112
collector:

javaagent/sdk-config.yaml

Lines changed: 0 additions & 248 deletions
This file was deleted.

spring-native/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,4 @@ dependencies {
2323
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
2424
implementation("com.h2database:h2")
2525
implementation("io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter")
26-
27-
// for otelCustomizer in Application.java
28-
implementation("io.opentelemetry.contrib:opentelemetry-samplers:1.51.0-alpha")
2926
}

0 commit comments

Comments
 (0)