forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disabled test and default configs for logs
Optimize level mapping by using comparison on intValue()
- Loading branch information
1 parent
1630974
commit 7f1c86f
Showing
5 changed files
with
62 additions
and
7 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...ployment/src/test/java/io/quarkus/opentelemetry/deployment/logs/OtelLogsDisabledTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.quarkus.opentelemetry.deployment.logs; | ||
|
||
import io.opentelemetry.sdk.logs.export.LogRecordExporter; | ||
import io.quarkus.opentelemetry.deployment.common.InMemoryLogRecordExporter; | ||
import io.quarkus.opentelemetry.deployment.common.InMemoryLogRecordExporterProvider; | ||
import io.quarkus.test.QuarkusUnitTest; | ||
import jakarta.enterprise.inject.Instance; | ||
import jakarta.inject.Inject; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.asset.StringAsset; | ||
import org.jboss.shrinkwrap.api.spec.JavaArchive; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class OtelLogsDisabledTest { | ||
@RegisterExtension | ||
static final QuarkusUnitTest TEST = new QuarkusUnitTest() | ||
.setArchiveProducer( | ||
() -> ShrinkWrap.create(JavaArchive.class) | ||
.add(new StringAsset( | ||
"quarkus.otel.logs.enabled=false\n" + | ||
"quarkus.otel.traces.enabled=false\n"), | ||
"application.properties")); | ||
|
||
|
||
@Inject | ||
Instance<LogRecordExporter> logRecordExporter; | ||
|
||
@Test | ||
public void testLogRecordExporter() { | ||
assertThat(logRecordExporter.isUnsatisfied()).isTrue(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ervices/io.opentelemetry.sdk.autoconfigure.spi.logs.ConfigurableLogRecordExporterProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
io.quarkus.opentelemetry.runtime.logs.spi.LogsExporterCDIProvider | ||
io.quarkus.opentelemetry.runtime.logs.spi.LogsExporterCDIProvider |