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
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ dependencies {

implementation(project(":instrumentation:logback:logback-appender-1.0:library"))

testInstrumentation(project(":instrumentation:logback:logback-mdc-1.0:javaagent"))

testImplementation("org.awaitility:awaitility")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.logs.Severity;
import io.opentelemetry.api.trace.SpanContext;
import io.opentelemetry.api.trace.TraceFlags;
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
Expand Down Expand Up @@ -168,15 +167,6 @@ private static void test(
satisfies(
EXCEPTION_STACKTRACE, v -> v.contains(LogbackTest.class.getName()))));
}
if (withParent) {
SpanContext spanContext = testing.spans().get(0).getSpanContext();
attributeAsserts.addAll(
Arrays.asList(
equalTo(AttributeKey.stringKey("trace_id"), spanContext.getTraceId()),
equalTo(AttributeKey.stringKey("span_id"), spanContext.getSpanId()),
equalTo(
AttributeKey.stringKey("trace_flags"), TraceFlags.getSampled().asHex())));
}
logRecord.hasAttributesSatisfyingExactly(attributeAsserts);
});
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,4 @@ public List<TypeInstrumentation> typeInstrumentations() {
public boolean isIndyReady() {
return true;
}

@Override
public int order() {
// run before logback appender instrumentation so that the appender instrumentation can observe
// the attributes added to the mdc by this instrumentation
return -1;
}
}
Loading