From c13eb7932e8513331ea851e2f39eab33d536eed3 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 8 Sep 2021 18:18:05 -0700 Subject: [PATCH] Update collector port (#4071) --- .../opentelemetry/e2ebenchmark/AgentBenchmark.java | 4 ++-- .../src/main/resources/collector-config.yml | 2 +- .../com/example/javaagent/DemoPropertySource.java | 13 ++++++------- .../com/example/javaagent/DemoPropertySource.java | 13 ++++++------- instrumentation/spring/README.md | 2 +- .../spring/spring-boot-autoconfigure/README.md | 2 +- .../smoketest/AbstractTestContainerManager.java | 2 +- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/benchmark-e2e/src/main/java/io/opentelemetry/e2ebenchmark/AgentBenchmark.java b/benchmark-e2e/src/main/java/io/opentelemetry/e2ebenchmark/AgentBenchmark.java index 55ea476a98..af9a6c2e42 100644 --- a/benchmark-e2e/src/main/java/io/opentelemetry/e2ebenchmark/AgentBenchmark.java +++ b/benchmark-e2e/src/main/java/io/opentelemetry/e2ebenchmark/AgentBenchmark.java @@ -64,7 +64,7 @@ public class AgentBenchmark { .withNetwork(Network.SHARED) .withNetworkAliases("collector") .withLogConsumer(new Slf4jLogConsumer(logger)) - .withExposedPorts(55680, 13133) + .withExposedPorts(4317, 13133) .waitingFor(Wait.forHttp("/").forPort(13133)) .withCopyFileToContainer( MountableFile.forClasspathResource("collector-config.yml"), @@ -80,7 +80,7 @@ public class AgentBenchmark { .withNetworkAliases("app") .withCopyFileToContainer( MountableFile.forHostPath(agentPath), "/opentelemetry-javaagent-all.jar") - .withEnv("OTEL_EXPORTER_OTLP_ENDPOINT", "collector:55680") + .withEnv("OTEL_EXPORTER_OTLP_ENDPOINT", "collector:4317") .withEnv("JAVA_TOOL_OPTIONS", "-javaagent:/opentelemetry-javaagent-all.jar") .withExposedPorts(8080); containers.add(app); diff --git a/benchmark-e2e/src/main/resources/collector-config.yml b/benchmark-e2e/src/main/resources/collector-config.yml index 9a580c6c53..eba192edae 100644 --- a/benchmark-e2e/src/main/resources/collector-config.yml +++ b/benchmark-e2e/src/main/resources/collector-config.yml @@ -2,7 +2,7 @@ receivers: otlp: protocols: grpc: - endpoint: 0.0.0.0:55680 + endpoint: 0.0.0.0:4317 exporters: logging: diff --git a/examples/distro/custom/src/main/java/com/example/javaagent/DemoPropertySource.java b/examples/distro/custom/src/main/java/com/example/javaagent/DemoPropertySource.java index c8a93d2094..809d812f3a 100644 --- a/examples/distro/custom/src/main/java/com/example/javaagent/DemoPropertySource.java +++ b/examples/distro/custom/src/main/java/com/example/javaagent/DemoPropertySource.java @@ -4,19 +4,18 @@ import io.opentelemetry.javaagent.extension.config.ConfigPropertySource; import java.util.Map; /** - * {@link ConfigPropertySource} is an SPI provided by OpenTelemetry Java instrumentation agent. - * By implementing it custom distributions can supply their own default configuration. - * The configuration priority, from highest to lowest is: - * system properties -> environment variables -> configuration file -> PropertySource SPI -> hard-coded defaults + * {@link ConfigPropertySource} is an SPI provided by OpenTelemetry Java instrumentation agent. By + * implementing it custom distributions can supply their own default configuration. The + * configuration priority, from highest to lowest is: system properties -> environment variables -> + * configuration file -> PropertySource SPI -> hard-coded defaults */ public class DemoPropertySource implements ConfigPropertySource { @Override public Map getProperties() { return Map.of( - "otel.exporter.otlp.endpoint", "http://collector:55680", + "otel.exporter.otlp.endpoint", "http://collector:4317", "otel.exporter.otlp.insecure", "true", - "otel.config.max.attrs", "16" - ); + "otel.config.max.attrs", "16"); } } diff --git a/examples/extension/src/main/java/com/example/javaagent/DemoPropertySource.java b/examples/extension/src/main/java/com/example/javaagent/DemoPropertySource.java index fcf992aa80..21b41483b0 100644 --- a/examples/extension/src/main/java/com/example/javaagent/DemoPropertySource.java +++ b/examples/extension/src/main/java/com/example/javaagent/DemoPropertySource.java @@ -5,10 +5,10 @@ import io.opentelemetry.javaagent.extension.config.ConfigPropertySource; import java.util.Map; /** - * {@link ConfigPropertySource} is an SPI provided by OpenTelemetry Java instrumentation agent. - * By implementing it custom distributions can supply their own default configuration. - * The configuration priority, from highest to lowest is: - * system properties -> environment variables -> configuration file -> PropertySource SPI -> hard-coded defaults + * {@link ConfigPropertySource} is an SPI provided by OpenTelemetry Java instrumentation agent. By + * implementing it custom distributions can supply their own default configuration. The + * configuration priority, from highest to lowest is: system properties -> environment variables -> + * configuration file -> PropertySource SPI -> hard-coded defaults */ @AutoService(ConfigPropertySource.class) public class DemoPropertySource implements ConfigPropertySource { @@ -16,9 +16,8 @@ public class DemoPropertySource implements ConfigPropertySource { @Override public Map getProperties() { return Map.of( - "otel.exporter.otlp.endpoint", "http://collector:55680", + "otel.exporter.otlp.endpoint", "http://collector:4317", "otel.exporter.otlp.insecure", "true", - "otel.config.max.attrs", "16" - ); + "otel.config.max.attrs", "16"); } } diff --git a/instrumentation/spring/README.md b/instrumentation/spring/README.md index f730bf6f2a..af423b4966 100644 --- a/instrumentation/spring/README.md +++ b/instrumentation/spring/README.md @@ -861,7 +861,7 @@ Add the following configurations to overwrite the default exporter values listed #otel.traces.sampler.probability=1 ## Default exporter configurations -#otel.exporter.otlp.endpoint=localhost:55680 +#otel.exporter.otlp.endpoint=localhost:4317 #otel.exporter.otlp.timeout=10s #otel.exporter.jaeger.endpoint=localhost:14250 #otel.exporter.jaeger.timeout=10s diff --git a/instrumentation/spring/spring-boot-autoconfigure/README.md b/instrumentation/spring/spring-boot-autoconfigure/README.md index e1a10bdf5f..8970e03d8a 100644 --- a/instrumentation/spring/spring-boot-autoconfigure/README.md +++ b/instrumentation/spring/spring-boot-autoconfigure/README.md @@ -397,7 +397,7 @@ If an exporter is present in the classpath during runtime and a spring bean of t | Feature | Property | Default Value | |-----------------|-------------------------------|------------------------------------| -| Otlp Exporter | otel.exporter.otlp.endpoint | localhost:55680 | +| Otlp Exporter | otel.exporter.otlp.endpoint | localhost:4317 | | | otel.exporter.otlp.timeout | 1s | | Jaeger Exporter | otel.exporter.jaeger.endpoint | localhost:14250 | | | otel.exporter.jaeger.timeout | 1s | diff --git a/smoke-tests/src/test/java/io/opentelemetry/smoketest/AbstractTestContainerManager.java b/smoke-tests/src/test/java/io/opentelemetry/smoketest/AbstractTestContainerManager.java index 7f997108fd..d461074858 100644 --- a/smoke-tests/src/test/java/io/opentelemetry/smoketest/AbstractTestContainerManager.java +++ b/smoke-tests/src/test/java/io/opentelemetry/smoketest/AbstractTestContainerManager.java @@ -28,7 +28,7 @@ public abstract class AbstractTestContainerManager implements TestContainerManag environment.put("OTEL_BSP_MAX_EXPORT_BATCH_SIZE", "1"); environment.put("OTEL_BSP_SCHEDULE_DELAY", "10ms"); environment.put("OTEL_IMR_EXPORT_INTERVAL", "1000"); - environment.put("OTEL_EXPORTER_OTLP_ENDPOINT", "http://" + COLLECTOR_ALIAS + ":55680"); + environment.put("OTEL_EXPORTER_OTLP_ENDPOINT", "http://" + COLLECTOR_ALIAS + ":4317"); environment.put("OTEL_RESOURCE_ATTRIBUTES", "service.name=smoke-test"); environment.put("OTEL_JAVAAGENT_DEBUG", "true"); return environment;