Skip to content

Commit 581d7ab

Browse files
authored
Revert "Expose values added by logback mdc instrumentation to the appender instrumentation (#14904)" (#14999)
1 parent 9dd8995 commit 581d7ab

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

instrumentation/logback/logback-appender-1.0/javaagent/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ dependencies {
4646

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

49-
testInstrumentation(project(":instrumentation:logback:logback-mdc-1.0:javaagent"))
50-
5149
testImplementation("org.awaitility:awaitility")
5250
}
5351

instrumentation/logback/logback-appender-1.0/javaagent/src/test/java/io/opentelemetry/instrumentation/logback/appender/v1_0/LogbackTest.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import io.opentelemetry.api.common.AttributeKey;
1818
import io.opentelemetry.api.logs.Severity;
1919
import io.opentelemetry.api.trace.SpanContext;
20-
import io.opentelemetry.api.trace.TraceFlags;
2120
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
2221
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
2322
import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
@@ -168,15 +167,6 @@ private static void test(
168167
satisfies(
169168
EXCEPTION_STACKTRACE, v -> v.contains(LogbackTest.class.getName()))));
170169
}
171-
if (withParent) {
172-
SpanContext spanContext = testing.spans().get(0).getSpanContext();
173-
attributeAsserts.addAll(
174-
Arrays.asList(
175-
equalTo(AttributeKey.stringKey("trace_id"), spanContext.getTraceId()),
176-
equalTo(AttributeKey.stringKey("span_id"), spanContext.getSpanId()),
177-
equalTo(
178-
AttributeKey.stringKey("trace_flags"), TraceFlags.getSampled().asHex())));
179-
}
180170
logRecord.hasAttributesSatisfyingExactly(attributeAsserts);
181171
});
182172
} else {

instrumentation/logback/logback-mdc-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/logback/mdc/v1_0/LogbackMdcInstrumentationModule.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,4 @@ public List<TypeInstrumentation> typeInstrumentations() {
2929
public boolean isIndyReady() {
3030
return true;
3131
}
32-
33-
@Override
34-
public int order() {
35-
// run before logback appender instrumentation so that the appender instrumentation can observe
36-
// the attributes added to the mdc by this instrumentation
37-
return -1;
38-
}
3932
}

0 commit comments

Comments
 (0)