Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the UndeployDeploy test failures against WildFly 35 and bump OTel collector version #323

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions micrometer/src/test/resources/otel-collector-config.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class UndeployDeployTest {

@Deployment(name = FIRST_DEPLOYMENT, managed = false)
public static Archive<?> createFirstDeployment() {
String mpConfig = "otel.service.name=UndeployDeployTest-first-deployment\notel.sdk.disabled=false\nTimeout/enabled=true";
String mpConfig = "otel.service.name=UndeployDeployTest-first-deployment\notel.sdk.disabled=false\notel.metric.export.interval=100\nTimeout/enabled=true";

return ShrinkWrap.create(WebArchive.class, FIRST_DEPLOYMENT + ".war")
.addPackages(true, HelloService.class.getPackage())
Expand All @@ -70,7 +70,7 @@ public static Archive<?> createFirstDeployment() {

@Deployment(name = SECOND_DEPLOYMENT, managed = false)
public static Archive<?> createSecondDeployment() {
String mpConfig = "otel.service.name=UndeployDeployTest-first-deployment\notel.sdk.disabled=false\nTimeout/enabled=false";
String mpConfig = "otel.service.name=UndeployDeployTest-first-deployment\notel.sdk.disabled=false\notel.metric.export.interval=100\nTimeout/enabled=false";

return ShrinkWrap.create(WebArchive.class, SECOND_DEPLOYMENT + ".war")
.addPackages(true, HelloService.class.getPackage())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class OpenTelemetryCollectorContainer {
public static final int DOCKER_HOST_OTLP_HTTP_PORT = DEFAULT_OTLP_HTTP_PORT + 100;
public static final int PROMETHEUS_PORT = 49152;
public static final int HEALTH_CHECK_PORT = 13133;
private static final String OTEL_CONFIG_DIR_NAME = "otel-collector";
private static final String OTEL_CONFIG_DIR_NAME = "otelcol-contrib";
private static final String OTEL_CONFIG_FILE_NAME = "config.yaml";
public static final String OTEL_COLLECTOR_CONFIG_LOCAL_PATH = Paths.get(System.getProperty("user.home"),
OTEL_CONFIG_DIR_NAME, OTEL_CONFIG_FILE_NAME).toAbsolutePath().toString();
Expand Down Expand Up @@ -87,7 +87,7 @@ private String getLocalOtelCollectorConfigYamlAbsolutePath() {

private OpenTelemetryCollectorContainer() {
otelCollectorContainer = new Docker.Builder("otel-collector",
"ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.103.1")
"ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.115.1")
.setContainerReadyCondition(() -> {
try {
new Socket("127.0.0.1", HEALTH_CHECK_PORT).close();
Expand All @@ -104,7 +104,6 @@ private OpenTelemetryCollectorContainer() {
.withPortMapping(String.format("%s:%s", DOCKER_HOST_OTLP_HTTP_PORT, DOCKER_CONTAINER_OTLP_HTTP_PORT))
.withPortMapping(String.format("%1$s:%1$s", HEALTH_CHECK_PORT))
.withPortMapping(String.format("%1$s:%1$s", PROMETHEUS_PORT))
.withCmdArg("--config=" + OTEL_COLLECTOR_CONFIG_CONTAINER_FILE_PATH)
.build();
}

Expand Down
29 changes: 16 additions & 13 deletions tooling-observability/src/main/resources/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,30 @@ processors:
batch:

exporters:
logging:
verbosity: normal
debug:
verbosity: detailed
prometheus:
endpoint: "0.0.0.0:49152"
otlp:
endpoint: 0.0.0.0:4217
tls:
insecure: true
# We don't test traces here
# otlp:
# endpoint: 0.0.0.0:4217
# tls:
# insecure: true

service:
# telemetry:
# logs:
# level: "debug"
pipelines:
metrics:
receivers: [ otlp ]
processors: [ batch ]
exporters: [ prometheus, logging ]
traces:
exporters: [ prometheus, debug ]
# We don't test traces here
# traces:
# receivers: [ otlp ]
# processors: [ batch ]
# exporters: [ otlp, debug ]
logs:
receivers: [ otlp ]
processors: [ ]
exporters: [ otlp, logging ]
processors: [ batch ]
exporters: [ debug ]

extensions: [ health_check, pprof, zpages ]
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public static void addOpenTelemetryCollectorConfiguration(final String otlpColle
if (!openTelemetrySubsystemExists(operations)) {
throw new IllegalStateException("OpenTelemetry subsystem not found");
}
operations.writeAttribute(OPENTELEMETRY_SUBSYSTEM_ADDRESS, "batch-delay", "1");
operations.writeAttribute(OPENTELEMETRY_SUBSYSTEM_ADDRESS, "exporter-type", "otlp");
operations.writeAttribute(OPENTELEMETRY_SUBSYSTEM_ADDRESS, "sampler-type", "on");
operations.writeAttribute(OPENTELEMETRY_SUBSYSTEM_ADDRESS, "max-export-batch-size", "512");
Expand Down
Loading