Browse Source

Small fixes (#11236)

Gregor Zeitlinger 10 months ago
parent
commit
d1591f72a7

+ 0 - 1
instrumentation/spring/starters/spring-boot-starter/build.gradle.kts

@@ -21,7 +21,6 @@ dependencies {
   api("io.opentelemetry:opentelemetry-exporter-logging")
   api("io.opentelemetry:opentelemetry-exporter-otlp")
   api("io.opentelemetry:opentelemetry-sdk")
-  api(project(":instrumentation-annotations"))
 
   implementation("io.opentelemetry.contrib:opentelemetry-aws-resources")
   implementation("io.opentelemetry.contrib:opentelemetry-gcp-resources")

+ 0 - 12
smoke-tests-otel-starter/src/main/java/io/opentelemetry/spring/smoketest/RuntimeHints.java

@@ -6,8 +6,6 @@
 package io.opentelemetry.spring.smoketest;
 
 import org.springframework.aot.hint.RuntimeHintsRegistrar;
-import org.springframework.aot.hint.TypeReference;
-import org.springframework.data.web.config.SpringDataJacksonConfiguration;
 
 // Necessary for GraalVM native test
 public class RuntimeHints implements RuntimeHintsRegistrar {
@@ -16,15 +14,5 @@ public class RuntimeHints implements RuntimeHintsRegistrar {
   public void registerHints(
       org.springframework.aot.hint.RuntimeHints hints, ClassLoader classLoader) {
     hints.resources().registerResourceBundle("org.apache.commons.dbcp2.LocalStrings");
-
-    // To remove from Spring Boot 3.2.3 release:
-    // https://github.com/spring-projects/spring-data-commons/issues/3025
-    hints
-        .reflection()
-        .registerType(
-            TypeReference.of("org.springframework.data.domain.Unpaged"),
-            hint -> {
-              hint.onReachableType(SpringDataJacksonConfiguration.PageModule.class);
-            });
   }
 }

+ 7 - 3
testing-common/src/main/java/io/opentelemetry/instrumentation/testing/util/TelemetryDataUtil.java

@@ -11,6 +11,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import io.opentelemetry.api.common.AttributeKey;
 import io.opentelemetry.api.trace.SpanId;
 import io.opentelemetry.api.trace.SpanKind;
+import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
 import io.opentelemetry.sdk.trace.data.SpanData;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -91,10 +92,13 @@ public final class TelemetryDataUtil {
   public static void assertScopeVersion(List<List<SpanData>> traces) {
     for (List<SpanData> trace : traces) {
       for (SpanData span : trace) {
-        if (!span.getInstrumentationScopeInfo().getName().equals("test")) {
-          assertThat(span.getInstrumentationScopeInfo().getVersion())
+        InstrumentationScopeInfo scopeInfo = span.getInstrumentationScopeInfo();
+        if (!scopeInfo.getName().equals("test")) {
+          assertThat(scopeInfo.getVersion())
               .as(
-                  "Instrumentation version was empty; make sure that the instrumentation name matches the gradle module name")
+                  "Instrumentation version of module %s was empty; make sure that the "
+                      + "instrumentation name matches the gradle module name",
+                  scopeInfo.getName())
               .isNotNull();
         }
       }