Skip to content

Commit 1f34205

Browse files
committed
Merge branch 'main' of github.com:open-telemetry/opentelemetry-java-instrumentation into indy-rmi2
2 parents e20ace1 + 5514595 commit 1f34205

File tree

18 files changed

+320
-128
lines changed

18 files changed

+320
-128
lines changed

.github/workflows/issue-management-stale-action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
exempt-issue-labels: "needs author feedback"
4848
days-before-pr-stale: -1
4949
days-before-pr-close: -1
50-
days-before-stale: 365
51-
days-before-close: 0
52-
close-issue-label: stale
50+
days-before-issue-stale: 365
51+
days-before-issue-close: 0
52+
stale-issue-label: stale
5353
close-issue-message: >
5454
Since there has been no activity on this enhancement for the past year we are closing it to help maintain our backlog.
5555
Anyone who would like to work on it is still welcome to do so, and we can re-open it at that time.

benchmark-overhead/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies {
2222
testImplementation("org.testcontainers:postgresql:1.21.3")
2323
testImplementation("org.junit.jupiter:junit-jupiter-api")
2424
testImplementation("org.junit.jupiter:junit-jupiter-params")
25-
testImplementation("com.squareup.okhttp3:okhttp:5.1.0")
25+
testImplementation("com.squareup.okhttp3:okhttp:5.2.0")
2626
testImplementation("org.jooq:joox:2.0.1")
2727
testImplementation("com.jayway.jsonpath:json-path:2.9.0")
2828
testImplementation("org.slf4j:slf4j-simple:2.0.17")

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ plugins {
2222

2323
buildscript {
2424
dependencies {
25-
classpath("com.squareup.okhttp3:okhttp:5.1.0")
25+
classpath("com.squareup.okhttp3:okhttp:5.2.0")
2626
}
2727
}
2828

examples/distro/instrumentation/servlet-3/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies {
2727
exclude group: 'org.eclipse.jetty', module: 'jetty-server'
2828
}
2929

30-
testImplementation "com.squareup.okhttp3:okhttp:5.1.0"
30+
testImplementation "com.squareup.okhttp3:okhttp:5.2.0"
3131
testImplementation "javax.servlet:javax.servlet-api:3.0.1"
3232
testImplementation "org.eclipse.jetty:jetty-server:8.2.0.v20160908"
3333
testImplementation "org.eclipse.jetty:jetty-servlet:8.2.0.v20160908"

examples/distro/smoke-tests/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies {
66
testImplementation("org.testcontainers:testcontainers:1.21.3")
77
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.20.0")
88
testImplementation("com.google.protobuf:protobuf-java-util:4.32.1")
9-
testImplementation("com.squareup.okhttp3:okhttp:5.1.0")
9+
testImplementation("com.squareup.okhttp3:okhttp:5.2.0")
1010
testImplementation("io.opentelemetry.proto:opentelemetry-proto:1.8.0-alpha")
1111
testImplementation("io.opentelemetry:opentelemetry-api")
1212

examples/extension/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ dependencies {
101101
testImplementation("org.testcontainers:testcontainers:1.21.3")
102102
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.20.0")
103103
testImplementation("com.google.protobuf:protobuf-java-util:4.32.1")
104-
testImplementation("com.squareup.okhttp3:okhttp:5.1.0")
104+
testImplementation("com.squareup.okhttp3:okhttp:5.2.0")
105105
testImplementation("io.opentelemetry:opentelemetry-api")
106106
testImplementation("io.opentelemetry.proto:opentelemetry-proto:1.8.0-alpha")
107107

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

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

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

49+
testInstrumentation(project(":instrumentation:logback:logback-mdc-1.0:javaagent"))
50+
4951
testImplementation("org.awaitility:awaitility")
5052
}
5153

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
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;
2021
import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension;
2122
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
2223
import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
@@ -167,6 +168,15 @@ private static void test(
167168
satisfies(
168169
EXCEPTION_STACKTRACE, v -> v.contains(LogbackTest.class.getName()))));
169170
}
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+
}
170180
logRecord.hasAttributesSatisfyingExactly(attributeAsserts);
171181
});
172182
} else {

instrumentation/logback/logback-appender-1.0/library/src/test/java/io/opentelemetry/instrumentation/logback/appender/v1_0/internal/LoggingEventMapperTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
import java.util.HashMap;
1818
import java.util.Map;
1919
import org.junit.jupiter.api.Test;
20+
import org.junit.jupiter.api.condition.DisabledInNativeImage;
2021

22+
@DisabledInNativeImage // conflict with Mockito
2123
class LoggingEventMapperTest {
2224

2325
@Test

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ 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+
}
3239
}

0 commit comments

Comments
 (0)