Skip to content

Commit 913ce1a

Browse files
authored
Update to otel 1.1.0 (#52)
1 parent f1dc596 commit 913ce1a

File tree

8 files changed

+15
-11
lines changed

8 files changed

+15
-11
lines changed

dependencyManagement/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ val DEPENDENCY_BOMS = listOf(
3333
"com.google.protobuf:protobuf-bom:3.15.6",
3434
"com.linecorp.armeria:armeria-bom:1.5.0",
3535
"io.grpc:grpc-bom:1.36.0",
36-
"io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:${if (!TEST_SNAPSHOTS) "1.0.1-alpha" else "1.1.0-alpha-SNAPSHOT"}",
36+
"io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:${if (!TEST_SNAPSHOTS) "1.1.0-alpha" else "1.2.0-alpha-SNAPSHOT"}",
3737
"org.apache.logging.log4j:log4j-bom:2.14.1",
3838
"org.junit:junit-bom:5.7.1",
3939
"org.springframework.boot:spring-boot-dependencies:2.4.3",
@@ -66,7 +66,7 @@ val DEPENDENCIES = listOf(
6666
"commons-logging:commons-logging:1.2",
6767
"com.sparkjava:spark-core:2.9.3",
6868
"com.squareup.okhttp3:okhttp:4.9.1",
69-
"io.opentelemetry.javaagent:opentelemetry-javaagent:${if (!TEST_SNAPSHOTS) "1.0.1" else "1.1.0-SNAPSHOT"}",
69+
"io.opentelemetry.javaagent:opentelemetry-javaagent:${if (!TEST_SNAPSHOTS) "1.1.0" else "1.2.0-SNAPSHOT"}",
7070
"net.bytebuddy:byte-buddy:1.10.22"
7171
)
7272

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
org.gradle.parallel=true
2+
org.gradle.caching=true
3+
4+
org.gradle.priority=low

instrumentation/log4j-2.13.2/src/main/java/software/amazon/opentelemetry/javaagent/instrumentation/log4j_2_13_2/AwsXrayLog4jInstrumentationModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public List<TypeInstrumentation> typeInstrumentations() {
5555

5656
public static class EmptyTypeInstrumentation implements TypeInstrumentation {
5757
@Override
58-
public ElementMatcher<? super TypeDescription> typeMatcher() {
58+
public ElementMatcher<TypeDescription> typeMatcher() {
5959
// we cannot use ContextDataProvider here because one of the classes that we inject implements
6060
// this interface, causing the interface to be loaded while it's being transformed, which
6161
// leads

instrumentation/logback-1.0/src/main/java/software/amazon/opentelemetry/javaagent/instrumentation/logback_1_0/AwsXrayLogbackInstrumentationModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public List<TypeInstrumentation> typeInstrumentations() {
3333
}
3434

3535
@Override
36-
public Map<String, String> contextStore() {
36+
public Map<String, String> getMuzzleContextStoreClasses() {
3737
return Collections.singletonMap(
3838
"ch.qos.logback.classic.spi.ILoggingEvent", Span.class.getName());
3939
}

instrumentation/logback-1.0/src/main/java/software/amazon/opentelemetry/javaagent/instrumentation/logback_1_0/AwsXrayLoggingEventInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public ElementMatcher<ClassLoader> classLoaderOptimization() {
4646
}
4747

4848
@Override
49-
public ElementMatcher<? super TypeDescription> typeMatcher() {
49+
public ElementMatcher<TypeDescription> typeMatcher() {
5050
return implementsInterface(named("ch.qos.logback.classic.spi.ILoggingEvent"));
5151
}
5252

sample-apps/spark-awssdkv1/src/main/java/com/amazon/sampleapp/MetricEmitter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.amazon.sampleapp;
22

3-
import io.opentelemetry.api.metrics.GlobalMetricsProvider;
3+
import io.opentelemetry.api.metrics.GlobalMeterProvider;
44
import io.opentelemetry.api.metrics.LongCounter;
55
import io.opentelemetry.api.metrics.LongSumObserver;
66
import io.opentelemetry.api.metrics.LongUpDownCounter;
@@ -39,7 +39,7 @@ public class MetricEmitter {
3939
String statusCodeValue = "";
4040

4141
public MetricEmitter() {
42-
Meter meter = GlobalMetricsProvider.getMeter("aws-otel", "1.0");
42+
Meter meter = GlobalMeterProvider.getMeter("aws-otel", "1.0");
4343

4444
// give a instanceId appending to the metricname so that we can check the metric for each round
4545
// of integ-test

sample-apps/spark/src/main/java/com/amazon/sampleapp/MetricEmitter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.amazon.sampleapp;
22

3-
import io.opentelemetry.api.metrics.GlobalMetricsProvider;
3+
import io.opentelemetry.api.metrics.GlobalMeterProvider;
44
import io.opentelemetry.api.metrics.LongCounter;
55
import io.opentelemetry.api.metrics.LongSumObserver;
66
import io.opentelemetry.api.metrics.LongUpDownCounter;
@@ -39,7 +39,7 @@ public class MetricEmitter {
3939
String statusCodeValue = "";
4040

4141
public MetricEmitter() {
42-
Meter meter = GlobalMetricsProvider.getMeter("aws-otel", "1.0");
42+
Meter meter = GlobalMeterProvider.getMeter("aws-otel", "1.0");
4343

4444
// give a instanceId appending to the metricname so that we can check the metric for each round
4545
// of integ-test

sample-apps/springboot/src/main/java/com/amazon/sampleapp/MetricEmitter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.amazon.sampleapp;
22

3-
import io.opentelemetry.api.metrics.GlobalMetricsProvider;
3+
import io.opentelemetry.api.metrics.GlobalMeterProvider;
44
import io.opentelemetry.api.metrics.LongCounter;
55
import io.opentelemetry.api.metrics.LongSumObserver;
66
import io.opentelemetry.api.metrics.LongUpDownCounter;
@@ -39,7 +39,7 @@ public class MetricEmitter {
3939
String statusCodeValue = "";
4040

4141
public MetricEmitter() {
42-
Meter meter = GlobalMetricsProvider.getMeter("aws-otel", "1.0");
42+
Meter meter = GlobalMeterProvider.getMeter("aws-otel", "1.0");
4343

4444
// give a instanceId appending to the metricname so that we can check the metric for each round
4545
// of integ-test

0 commit comments

Comments
 (0)