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.
- Loading branch information
1 parent
d41ab4c
commit abc8100
Showing
29 changed files
with
743 additions
and
19 deletions.
There are no files selected for viewing
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
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
17 changes: 17 additions & 0 deletions
17
...oyment/src/main/java/io/quarkus/opentelemetry/deployment/logging/LogHandlerProcessor.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,17 @@ | ||
package io.quarkus.opentelemetry.deployment.logging; | ||
|
||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.deployment.annotations.ExecutionTime; | ||
import io.quarkus.deployment.annotations.Record; | ||
import io.quarkus.deployment.builditem.LogHandlerBuildItem; | ||
import io.quarkus.opentelemetry.runtime.logs.OpenTelemetryLogConfig; | ||
import io.quarkus.opentelemetry.runtime.logs.OpenTelemetryLogRecorder; | ||
|
||
class LogHandlerProcessor { | ||
|
||
@BuildStep | ||
@Record(ExecutionTime.RUNTIME_INIT) | ||
LogHandlerBuildItem build(OpenTelemetryLogRecorder recorder, OpenTelemetryLogConfig config) { | ||
return new LogHandlerBuildItem(recorder.initializeHandler(config)); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
.../runtime/src/main/java/io/quarkus/opentelemetry/runtime/config/build/LogsBuildConfig.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,27 @@ | ||
package io.quarkus.opentelemetry.runtime.config.build; | ||
|
||
import static io.quarkus.opentelemetry.runtime.config.build.ExporterType.Constants.CDI_VALUE; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
import io.smallrye.config.WithDefault; | ||
|
||
public interface LogsBuildConfig { | ||
/** | ||
* Enable logs with OpenTelemetry. | ||
* <p> | ||
* This property is not available in the Open Telemetry SDK. It's Quarkus specific. | ||
* <p> | ||
* Support for logs will be enabled if OpenTelemetry support is enabled | ||
* and either this value is true, or this value is unset. | ||
*/ | ||
@WithDefault("false") | ||
Optional<Boolean> enabled(); | ||
|
||
/** | ||
* The Logs exporter to use. | ||
*/ | ||
@WithDefault(CDI_VALUE) | ||
List<String> exporter(); | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...java/io/quarkus/opentelemetry/runtime/config/runtime/exporter/OtlpExporterLogsConfig.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,7 @@ | ||
package io.quarkus.opentelemetry.runtime.config.runtime.exporter; | ||
|
||
import io.quarkus.runtime.annotations.ConfigGroup; | ||
|
||
@ConfigGroup | ||
public interface OtlpExporterLogsConfig extends OtlpExporterConfig { | ||
} |
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
Oops, something went wrong.