Update collector port (#4071)

This commit is contained in:
Trask Stalnaker 2021-09-08 18:18:05 -07:00 committed by GitHub
parent a279b7d5be
commit c13eb7932e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 20 deletions

View File

@ -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);

View File

@ -2,7 +2,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:55680
endpoint: 0.0.0.0:4317
exporters:
logging:

View File

@ -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<String, String> 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");
}
}

View File

@ -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<String, String> 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");
}
}

View File

@ -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

View File

@ -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 |

View File

@ -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;