Update collector port (#4071)
This commit is contained in:
parent
a279b7d5be
commit
c13eb7932e
|
@ -64,7 +64,7 @@ public class AgentBenchmark {
|
||||||
.withNetwork(Network.SHARED)
|
.withNetwork(Network.SHARED)
|
||||||
.withNetworkAliases("collector")
|
.withNetworkAliases("collector")
|
||||||
.withLogConsumer(new Slf4jLogConsumer(logger))
|
.withLogConsumer(new Slf4jLogConsumer(logger))
|
||||||
.withExposedPorts(55680, 13133)
|
.withExposedPorts(4317, 13133)
|
||||||
.waitingFor(Wait.forHttp("/").forPort(13133))
|
.waitingFor(Wait.forHttp("/").forPort(13133))
|
||||||
.withCopyFileToContainer(
|
.withCopyFileToContainer(
|
||||||
MountableFile.forClasspathResource("collector-config.yml"),
|
MountableFile.forClasspathResource("collector-config.yml"),
|
||||||
|
@ -80,7 +80,7 @@ public class AgentBenchmark {
|
||||||
.withNetworkAliases("app")
|
.withNetworkAliases("app")
|
||||||
.withCopyFileToContainer(
|
.withCopyFileToContainer(
|
||||||
MountableFile.forHostPath(agentPath), "/opentelemetry-javaagent-all.jar")
|
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")
|
.withEnv("JAVA_TOOL_OPTIONS", "-javaagent:/opentelemetry-javaagent-all.jar")
|
||||||
.withExposedPorts(8080);
|
.withExposedPorts(8080);
|
||||||
containers.add(app);
|
containers.add(app);
|
||||||
|
|
|
@ -2,7 +2,7 @@ receivers:
|
||||||
otlp:
|
otlp:
|
||||||
protocols:
|
protocols:
|
||||||
grpc:
|
grpc:
|
||||||
endpoint: 0.0.0.0:55680
|
endpoint: 0.0.0.0:4317
|
||||||
|
|
||||||
exporters:
|
exporters:
|
||||||
logging:
|
logging:
|
||||||
|
|
|
@ -4,19 +4,18 @@ import io.opentelemetry.javaagent.extension.config.ConfigPropertySource;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link ConfigPropertySource} is an SPI provided by OpenTelemetry Java instrumentation agent.
|
* {@link ConfigPropertySource} is an SPI provided by OpenTelemetry Java instrumentation agent. By
|
||||||
* By implementing it custom distributions can supply their own default configuration.
|
* implementing it custom distributions can supply their own default configuration. The
|
||||||
* The configuration priority, from highest to lowest is:
|
* configuration priority, from highest to lowest is: system properties -> environment variables ->
|
||||||
* system properties -> environment variables -> configuration file -> PropertySource SPI -> hard-coded defaults
|
* configuration file -> PropertySource SPI -> hard-coded defaults
|
||||||
*/
|
*/
|
||||||
public class DemoPropertySource implements ConfigPropertySource {
|
public class DemoPropertySource implements ConfigPropertySource {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> getProperties() {
|
public Map<String, String> getProperties() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
"otel.exporter.otlp.endpoint", "http://collector:55680",
|
"otel.exporter.otlp.endpoint", "http://collector:4317",
|
||||||
"otel.exporter.otlp.insecure", "true",
|
"otel.exporter.otlp.insecure", "true",
|
||||||
"otel.config.max.attrs", "16"
|
"otel.config.max.attrs", "16");
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ import io.opentelemetry.javaagent.extension.config.ConfigPropertySource;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link ConfigPropertySource} is an SPI provided by OpenTelemetry Java instrumentation agent.
|
* {@link ConfigPropertySource} is an SPI provided by OpenTelemetry Java instrumentation agent. By
|
||||||
* By implementing it custom distributions can supply their own default configuration.
|
* implementing it custom distributions can supply their own default configuration. The
|
||||||
* The configuration priority, from highest to lowest is:
|
* configuration priority, from highest to lowest is: system properties -> environment variables ->
|
||||||
* system properties -> environment variables -> configuration file -> PropertySource SPI -> hard-coded defaults
|
* configuration file -> PropertySource SPI -> hard-coded defaults
|
||||||
*/
|
*/
|
||||||
@AutoService(ConfigPropertySource.class)
|
@AutoService(ConfigPropertySource.class)
|
||||||
public class DemoPropertySource implements ConfigPropertySource {
|
public class DemoPropertySource implements ConfigPropertySource {
|
||||||
|
@ -16,9 +16,8 @@ public class DemoPropertySource implements ConfigPropertySource {
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> getProperties() {
|
public Map<String, String> getProperties() {
|
||||||
return Map.of(
|
return Map.of(
|
||||||
"otel.exporter.otlp.endpoint", "http://collector:55680",
|
"otel.exporter.otlp.endpoint", "http://collector:4317",
|
||||||
"otel.exporter.otlp.insecure", "true",
|
"otel.exporter.otlp.insecure", "true",
|
||||||
"otel.config.max.attrs", "16"
|
"otel.config.max.attrs", "16");
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -861,7 +861,7 @@ Add the following configurations to overwrite the default exporter values listed
|
||||||
#otel.traces.sampler.probability=1
|
#otel.traces.sampler.probability=1
|
||||||
|
|
||||||
## Default exporter configurations
|
## Default exporter configurations
|
||||||
#otel.exporter.otlp.endpoint=localhost:55680
|
#otel.exporter.otlp.endpoint=localhost:4317
|
||||||
#otel.exporter.otlp.timeout=10s
|
#otel.exporter.otlp.timeout=10s
|
||||||
#otel.exporter.jaeger.endpoint=localhost:14250
|
#otel.exporter.jaeger.endpoint=localhost:14250
|
||||||
#otel.exporter.jaeger.timeout=10s
|
#otel.exporter.jaeger.timeout=10s
|
||||||
|
|
|
@ -397,7 +397,7 @@ If an exporter is present in the classpath during runtime and a spring bean of t
|
||||||
|
|
||||||
| Feature | Property | Default Value |
|
| 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 |
|
| | otel.exporter.otlp.timeout | 1s |
|
||||||
| Jaeger Exporter | otel.exporter.jaeger.endpoint | localhost:14250 |
|
| Jaeger Exporter | otel.exporter.jaeger.endpoint | localhost:14250 |
|
||||||
| | otel.exporter.jaeger.timeout | 1s |
|
| | otel.exporter.jaeger.timeout | 1s |
|
||||||
|
|
|
@ -28,7 +28,7 @@ public abstract class AbstractTestContainerManager implements TestContainerManag
|
||||||
environment.put("OTEL_BSP_MAX_EXPORT_BATCH_SIZE", "1");
|
environment.put("OTEL_BSP_MAX_EXPORT_BATCH_SIZE", "1");
|
||||||
environment.put("OTEL_BSP_SCHEDULE_DELAY", "10ms");
|
environment.put("OTEL_BSP_SCHEDULE_DELAY", "10ms");
|
||||||
environment.put("OTEL_IMR_EXPORT_INTERVAL", "1000");
|
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_RESOURCE_ATTRIBUTES", "service.name=smoke-test");
|
||||||
environment.put("OTEL_JAVAAGENT_DEBUG", "true");
|
environment.put("OTEL_JAVAAGENT_DEBUG", "true");
|
||||||
return environment;
|
return environment;
|
||||||
|
|
Loading…
Reference in New Issue