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

Add java.util.logging javaagent instrumentation #4941

Merged
Prev Previous commit
Next Next commit
Unroll
  • Loading branch information
trask committed Dec 20, 2021
commit 39f96d1d039c2f567067f17ab974aa8acdb33f69
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.opentelemetry.instrumentation.test.AgentInstrumentationSpecification
import io.opentelemetry.sdk.logs.data.Severity
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes
import spock.lang.Unroll

import java.util.logging.Level
import java.util.logging.Logger
Expand All @@ -18,6 +19,7 @@ class JavaUtilLoggingTest extends AgentInstrumentationSpecification {

private static final Logger logger = Logger.getLogger("abc")

@Unroll
def "test method=#testMethod with exception=#exception and parent=#parent"() {
when:
if (parent) {
Expand Down Expand Up @@ -67,7 +69,7 @@ class JavaUtilLoggingTest extends AgentInstrumentationSpecification {
assertThat(log.getSpanContext().isValid()).isFalse()
}
} else {
Thread.sleep(500) // sleep a bit just to make sure no span is captured
Thread.sleep(500) // sleep a bit just to make sure no log is captured
logs.size() == 0
}

Expand Down