Skip to content
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
7 changes: 7 additions & 0 deletions e2e/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ android {
}
}

tasks.withType<Test>().configureEach {
systemProperty(
"java.util.logging.config.file",
project.file("src/test/resources/logging.properties").absolutePath
)
}

dependencies {
// Uncomment to use the local project
implementation(project(":observability-android"))
Expand Down
19 changes: 19 additions & 0 deletions e2e/android/app/src/test/resources/logging.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# JUL configuration for unit tests.
#
# The OTLP HTTP exporter logs SEVERE stack traces whenever it can't reach its
# endpoint. In tests the exporter is pointed at a per-test MockWebServer that
# only has the sampling-config response enqueued, so every span/log/metric
# export fails with either "unexpected end of stream" (no response in queue)
# or "Connection refused" (previous test's server already shut down). These
# failures are irrelevant because assertions read telemetry from
# InMemoryTelemetryInspector, not HTTP. Silence those loggers to keep test
# output readable.

handlers = java.util.logging.ConsoleHandler
.level = INFO

java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

io.opentelemetry.exporter.internal.http.HttpExporter.level = OFF
io.opentelemetry.exporter.internal.grpc.GrpcExporter.level = OFF
Loading