opentelemetry-java-contrib icon indicating copy to clipboard operation
opentelemetry-java-contrib copied to clipboard

[Maven Extension] Logging options

Open delanym opened this issue 3 years ago • 2 comments

More control over the logs would be nice. I want tracing on by default, so if the endpoint is inaccessible for whatever reason Id like to silence this sort of thing

Jan 04, 2022 12:05:29 PM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
SEVERE: Failed to export spans. The request could not be executed. Full error message: Failed to connect to /10.1.1.1:4317

Can use https://maven.apache.org/ref/3.8.4/apidocs/org/slf4j/impl/SimpleLogger.html rather than stdout, like https://github.com/gitflow-incremental-builder/gitflow-incremental-builder/blob/master/src/main/java/com/vackosar/gitflowincrementalbuild/boundary/MavenLifecycleParticipant.java

And/or a separate -Dotel.log=none

delanym avatar Jan 04 '22 10:01 delanym

The OpenTelemetry SDK uses java.util.logging instead of slf4j to be dependency-free. Is it possible for a Maven build to redirect j.u.l to slf4j?

anuraaga avatar Jan 04 '22 11:01 anuraaga

Not that I know of. Seems difficult even turning it off https://www.titanwolf.org/Network/q/091d88ad-bd61-4750-8f94-37594648f6df/y

There some strong argument for using SLF4J over at https://stackoverflow.com/questions/11359187/why-not-use-java-util-logging Pls consider

delanym avatar Jan 04 '22 11:01 delanym