From 168125c71ff1a9cbac0b6987643c3a7615e9deb5 Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Fri, 25 Aug 2023 10:53:23 +0300 Subject: [PATCH 1/2] Add instrumentation for hibernate reactive --- docs/supported-libraries.md | 3 +- .../javaagent/build.gradle.kts | 83 +++++++++++++++++++ .../reactive/v1_0/HibernateReactiveTest.java | 27 ++++-- .../hibernate/reactive/v1_0/Value.java | 0 .../resources/META-INF/persistence.xml | 0 .../reactive/v2_0/HibernateReactiveTest.java | 27 ++++-- .../hibernate/reactive/v2_0/Value.java | 0 .../resources/META-INF/persistence.xml | 0 .../hibernate/reactive/ContextOperator.java | 72 ++++++++++++++++ .../hibernate/reactive/FunctionWrapper.java | 39 +++++++++ ...ibernateReactiveInstrumentationModule.java | 33 ++++++++ .../MutinySessionFactoryInstrumentation.java | 42 ++++++++++ .../StageSessionFactoryInstrumentation.java | 52 ++++++++++++ .../javaagent/build.gradle.kts | 54 ------------ settings.gradle.kts | 1 + 15 files changed, 362 insertions(+), 71 deletions(-) create mode 100644 instrumentation/hibernate/hibernate-reactive/javaagent/build.gradle.kts rename instrumentation/{vertx/vertx-sql-client-4.0 => hibernate/hibernate-reactive}/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java (85%) rename instrumentation/{vertx/vertx-sql-client-4.0 => hibernate/hibernate-reactive}/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java (100%) rename instrumentation/{vertx/vertx-sql-client-4.0 => hibernate/hibernate-reactive}/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml (100%) rename instrumentation/{vertx/vertx-sql-client-4.0 => hibernate/hibernate-reactive}/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java (85%) rename instrumentation/{vertx/vertx-sql-client-4.0 => hibernate/hibernate-reactive}/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java (100%) rename instrumentation/{vertx/vertx-sql-client-4.0 => hibernate/hibernate-reactive}/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml (100%) create mode 100644 instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/ContextOperator.java create mode 100644 instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/FunctionWrapper.java create mode 100644 instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/HibernateReactiveInstrumentationModule.java create mode 100644 instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/MutinySessionFactoryInstrumentation.java create mode 100644 instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/StageSessionFactoryInstrumentation.java diff --git a/docs/supported-libraries.md b/docs/supported-libraries.md index ae56d38817fb..a2a6a53b75c4 100644 --- a/docs/supported-libraries.md +++ b/docs/supported-libraries.md @@ -18,7 +18,7 @@ or [contributing](../CONTRIBUTING.md). These are the supported libraries and frameworks: | Library/Framework | Auto-instrumented versions | Standalone Library Instrumentation [1] | Semantic Conventions | -| ------------------------------------------------------------------------------------------------------------------------------------------- |-------------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +|---------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | [Akka Actors](https://doc.akka.io/docs/akka/current/typed/index.html) | 2.5+ | N/A | Context propagation | | [Akka HTTP](https://doc.akka.io/docs/akka-http/current/index.html) | 10.0+ | N/A | [HTTP Client Spans], [HTTP Client Metrics], [HTTP Server Spans], [HTTP Server Metrics] | | [Apache Axis2](https://axis.apache.org/axis2/java/core/) | 1.6+ | N/A | Provides `http.route` [2], Controller Spans [3] | @@ -65,6 +65,7 @@ These are the supported libraries and frameworks: | [Guava ListenableFuture](https://guava.dev/releases/snapshot/api/docs/com/google/common/util/concurrent/ListenableFuture.html) | 10.0+ | [opentelemetry-guava-10.0](../instrumentation/guava-10.0/library) | Context propagation | | [GWT](http://www.gwtproject.org/) | 2.0+ | N/A | [RPC Server Spans] | | [Hibernate](https://github.com/hibernate/hibernate-orm) | 3.3+ | N/A | none | +| [Hibernate Reactive](https://hibernate.org/reactive) | 1.0+ | N/A | none | | [HikariCP](https://github.com/brettwooldridge/HikariCP) | 3.0+ | [opentelemetry-hikaricp-3.0](../instrumentation/hikaricp-3.0/library) | [Database Pool Metrics] | | [HttpURLConnection](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/HttpURLConnection.html) | Java 8+ | N/A | [HTTP Client Spans], [HTTP Client Metrics] | | [Hystrix](https://github.com/Netflix/Hystrix) | 1.4+ | N/A | none | diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/build.gradle.kts b/instrumentation/hibernate/hibernate-reactive/javaagent/build.gradle.kts new file mode 100644 index 000000000000..624313d40e01 --- /dev/null +++ b/instrumentation/hibernate/hibernate-reactive/javaagent/build.gradle.kts @@ -0,0 +1,83 @@ +plugins { + id("otel.javaagent-instrumentation") +} + +muzzle { + pass { + group.set("org.hibernate.reactive") + module.set("hibernate-reactive-core") + versions.set("(,)") + assertInverse.set(true) + } +} + +dependencies { + compileOnly("org.hibernate.reactive:hibernate-reactive-core:1.0.0.Final") + + testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent")) + testInstrumentation(project(":instrumentation:vertx:vertx-sql-client-4.0:javaagent")) + + library("io.vertx:vertx-sql-client:4.4.2") + compileOnly("io.vertx:vertx-codegen:4.4.2") + + testLibrary("io.vertx:vertx-pg-client:4.4.2") + testLibrary("io.vertx:vertx-codegen:4.4.2") +} + +val latestDepTest = findProperty("testLatestDeps") as Boolean + +testing { + suites { + val hibernateReactive1Test by registering(JvmTestSuite::class) { + dependencies { + implementation("org.testcontainers:testcontainers") + if (latestDepTest) { + implementation("org.hibernate.reactive:hibernate-reactive-core:1.+") + implementation("io.vertx:vertx-pg-client:+") + } else { + implementation("org.hibernate.reactive:hibernate-reactive-core:1.0.0.Final") + implementation("io.vertx:vertx-pg-client:4.1.5") + } + } + } + + val hibernateReactive2Test by registering(JvmTestSuite::class) { + dependencies { + implementation("org.testcontainers:testcontainers") + if (latestDepTest) { + implementation("org.hibernate.reactive:hibernate-reactive-core:2.+") + implementation("io.vertx:vertx-pg-client:+") + } else { + implementation("org.hibernate.reactive:hibernate-reactive-core:2.0.0.Final") + implementation("io.vertx:vertx-pg-client:4.4.2") + } + } + } + } +} + +tasks { + withType().configureEach { + usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) + } + named("compileHibernateReactive2TestJava", JavaCompile::class).configure { + options.release.set(11) + } + val testJavaVersion = + gradle.startParameter.projectProperties.get("testJavaVersion")?.let(JavaVersion::toVersion) + ?: JavaVersion.current() + if (testJavaVersion.isJava8) { + named("hibernateReactive2Test", Test::class).configure { + enabled = false + } + if (latestDepTest) { + named("hibernateReactive1Test", Test::class).configure { + enabled = false + } + } + } + + check { + dependsOn(testing.suites) + } +} diff --git a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java similarity index 85% rename from instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java rename to instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java index 1db02739d392..85e2e0b2cea9 100644 --- a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java +++ b/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java @@ -14,6 +14,7 @@ import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NET_PEER_NAME; import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NET_PEER_PORT; +import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.SpanKind; import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension; import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; @@ -98,10 +99,15 @@ void testMutiny() { () -> { mutinySessionFactory .withSession( - session -> - session - .find(Value.class, 1L) - .invoke(value -> testing.runWithSpan("callback", () -> {}))) + session -> { + if (!Span.current().getSpanContext().isValid()) { + throw new IllegalStateException("missing parent span"); + } + + return session + .find(Value.class, 1L) + .invoke(value -> testing.runWithSpan("callback", () -> {})); + }) .await() .atMost(Duration.ofSeconds(30)); }); @@ -117,10 +123,15 @@ void testStage() throws Exception { () -> stageSessionFactory .withSession( - session -> - session - .find(Value.class, 1L) - .thenAccept(value -> testing.runWithSpan("callback", () -> {}))) + session -> { + if (!Span.current().getSpanContext().isValid()) { + throw new IllegalStateException("missing parent span"); + } + + return session + .find(Value.class, 1L) + .thenAccept(value -> testing.runWithSpan("callback", () -> {})); + }) .toCompletableFuture()) .get(30, TimeUnit.SECONDS); diff --git a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java similarity index 100% rename from instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java rename to instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java diff --git a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml b/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml similarity index 100% rename from instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml rename to instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml diff --git a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java similarity index 85% rename from instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java rename to instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java index e86fcc67b7b4..b06bd0d7af08 100644 --- a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java +++ b/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java @@ -14,6 +14,7 @@ import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NET_PEER_NAME; import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.NET_PEER_PORT; +import io.opentelemetry.api.trace.Span; import io.opentelemetry.api.trace.SpanKind; import io.opentelemetry.instrumentation.testing.junit.AgentInstrumentationExtension; import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension; @@ -98,10 +99,15 @@ void testMutiny() { () -> { mutinySessionFactory .withSession( - session -> - session - .find(Value.class, 1L) - .invoke(value -> testing.runWithSpan("callback", () -> {}))) + session -> { + if (!Span.current().getSpanContext().isValid()) { + throw new IllegalStateException("missing parent span"); + } + + return session + .find(Value.class, 1L) + .invoke(value -> testing.runWithSpan("callback", () -> {})); + }) .await() .atMost(Duration.ofSeconds(30)); }); @@ -117,10 +123,15 @@ void testStage() throws Exception { () -> stageSessionFactory .withSession( - session -> - session - .find(Value.class, 1L) - .thenAccept(value -> testing.runWithSpan("callback", () -> {}))) + session -> { + if (!Span.current().getSpanContext().isValid()) { + throw new IllegalStateException("missing parent span"); + } + + return session + .find(Value.class, 1L) + .thenAccept(value -> testing.runWithSpan("callback", () -> {})); + }) .toCompletableFuture()) .get(30, TimeUnit.SECONDS); diff --git a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java similarity index 100% rename from instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java rename to instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java diff --git a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml b/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml similarity index 100% rename from instrumentation/vertx/vertx-sql-client-4.0/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml rename to instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/ContextOperator.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/ContextOperator.java new file mode 100644 index 000000000000..c4a6c8022db0 --- /dev/null +++ b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/ContextOperator.java @@ -0,0 +1,72 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; + +import io.opentelemetry.context.Context; +import io.opentelemetry.context.Scope; +import io.smallrye.mutiny.Uni; +import io.smallrye.mutiny.operators.UniOperator; +import io.smallrye.mutiny.subscription.UniSubscriber; +import io.smallrye.mutiny.subscription.UniSubscription; + +public final class ContextOperator extends UniOperator { + private final Context context; + + public ContextOperator(Uni upstream, Context context) { + super(upstream); + this.context = context; + } + + public static Uni plug(Uni uni) { + if (uni instanceof ContextOperator) { + return uni; + } + Context parentContext = Context.current(); + if (parentContext == Context.root()) { + return uni; + } + + return uni.plug(u -> new ContextOperator<>(u, parentContext)); + } + + @Override + public void subscribe(UniSubscriber downstream) { + try (Scope ignore = context.makeCurrent()) { + upstream().subscribe().withSubscriber(new ContextSubscriber<>(downstream, context)); + } + } + + private static class ContextSubscriber implements UniSubscriber { + private final UniSubscriber downstream; + private final Context context; + + private ContextSubscriber(UniSubscriber downstream, Context context) { + this.downstream = downstream; + this.context = context; + } + + @Override + public void onSubscribe(UniSubscription uniSubscription) { + try (Scope ignore = context.makeCurrent()) { + downstream.onSubscribe(uniSubscription); + } + } + + @Override + public void onItem(T t) { + try (Scope ignore = context.makeCurrent()) { + downstream.onItem(t); + } + } + + @Override + public void onFailure(Throwable throwable) { + try (Scope ignore = context.makeCurrent()) { + downstream.onFailure(throwable); + } + } + } +} diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/FunctionWrapper.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/FunctionWrapper.java new file mode 100644 index 000000000000..0ee3c09569ec --- /dev/null +++ b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/FunctionWrapper.java @@ -0,0 +1,39 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; + +import io.opentelemetry.context.Context; +import io.opentelemetry.context.Scope; +import java.util.function.Function; + +public final class FunctionWrapper implements Function { + private final Function delegate; + private final Context context; + + private FunctionWrapper(Function delegate, Context context) { + this.delegate = delegate; + this.context = context; + } + + public static Function wrap(Function function) { + if (function instanceof FunctionWrapper) { + return function; + } + Context context = Context.current(); + if (context == Context.root()) { + return function; + } + + return new FunctionWrapper<>(function, context); + } + + @Override + public R apply(T t) { + try (Scope ignore = context.makeCurrent()) { + return delegate.apply(t); + } + } +} diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/HibernateReactiveInstrumentationModule.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/HibernateReactiveInstrumentationModule.java new file mode 100644 index 000000000000..b2fe71a62cd8 --- /dev/null +++ b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/HibernateReactiveInstrumentationModule.java @@ -0,0 +1,33 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; + +import static java.util.Arrays.asList; + +import com.google.auto.service.AutoService; +import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule; +import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation; +import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; +import java.util.List; + +@AutoService(InstrumentationModule.class) +public class HibernateReactiveInstrumentationModule extends InstrumentationModule { + + public HibernateReactiveInstrumentationModule() { + super("hibernate-reactive"); + } + + @Override + public boolean defaultEnabled(ConfigProperties config) { + return true; + } + + @Override + public List typeInstrumentations() { + return asList( + new StageSessionFactoryInstrumentation(), new MutinySessionFactoryInstrumentation()); + } +} diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/MutinySessionFactoryInstrumentation.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/MutinySessionFactoryInstrumentation.java new file mode 100644 index 000000000000..1fd743a8a70d --- /dev/null +++ b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/MutinySessionFactoryInstrumentation.java @@ -0,0 +1,42 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; + +import static net.bytebuddy.matcher.ElementMatchers.nameStartsWith; +import static net.bytebuddy.matcher.ElementMatchers.named; +import static net.bytebuddy.matcher.ElementMatchers.returns; + +import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation; +import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer; +import io.smallrye.mutiny.Uni; +import net.bytebuddy.asm.Advice; +import net.bytebuddy.description.type.TypeDescription; +import net.bytebuddy.matcher.ElementMatcher; + +public class MutinySessionFactoryInstrumentation implements TypeInstrumentation { + + @Override + public ElementMatcher typeMatcher() { + return named("org.hibernate.reactive.mutiny.impl.MutinySessionFactoryImpl"); + } + + @Override + public void transform(TypeTransformer transformer) { + transformer.applyAdviceToMethod( + nameStartsWith("open") + .or(nameStartsWith("with")) + .and(returns(named("io.smallrye.mutiny.Uni"))), + this.getClass().getName() + "$ContextAdvice"); + } + + @SuppressWarnings("unused") + public static class ContextAdvice { + @Advice.OnMethodExit(onThrowable = Throwable.class, suppress = Throwable.class) + public static void onExit(@Advice.Return(readOnly = false) Uni uni) { + uni = ContextOperator.plug(uni); + } + } +} diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/StageSessionFactoryInstrumentation.java b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/StageSessionFactoryInstrumentation.java new file mode 100644 index 000000000000..ae342a9f4446 --- /dev/null +++ b/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/StageSessionFactoryInstrumentation.java @@ -0,0 +1,52 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; + +import static net.bytebuddy.matcher.ElementMatchers.named; +import static net.bytebuddy.matcher.ElementMatchers.namedOneOf; +import static net.bytebuddy.matcher.ElementMatchers.takesArgument; + +import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation; +import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer; +import java.util.function.Function; +import net.bytebuddy.asm.Advice; +import net.bytebuddy.description.type.TypeDescription; +import net.bytebuddy.matcher.ElementMatcher; + +public class StageSessionFactoryInstrumentation implements TypeInstrumentation { + @Override + public ElementMatcher typeMatcher() { + return named("org.hibernate.reactive.stage.impl.StageSessionFactoryImpl"); + } + + @Override + public void transform(TypeTransformer transformer) { + transformer.applyAdviceToMethod( + namedOneOf("withSession", "withStatelessSession").and(takesArgument(0, Function.class)), + this.getClass().getName() + "$Function0Advice"); + transformer.applyAdviceToMethod( + namedOneOf("withSession", "withStatelessSession").and(takesArgument(1, Function.class)), + this.getClass().getName() + "$Function1Advice"); + } + + @SuppressWarnings("unused") + public static class Function0Advice { + @Advice.OnMethodEnter(suppress = Throwable.class) + public static void onEnter( + @Advice.Argument(value = 0, readOnly = false) Function function) { + function = FunctionWrapper.wrap(function); + } + } + + @SuppressWarnings("unused") + public static class Function1Advice { + @Advice.OnMethodEnter(suppress = Throwable.class) + public static void onEnter( + @Advice.Argument(value = 1, readOnly = false) Function function) { + function = FunctionWrapper.wrap(function); + } + } +} diff --git a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/build.gradle.kts b/instrumentation/vertx/vertx-sql-client-4.0/javaagent/build.gradle.kts index 224390df7155..4526f2ad8f83 100644 --- a/instrumentation/vertx/vertx-sql-client-4.0/javaagent/build.gradle.kts +++ b/instrumentation/vertx/vertx-sql-client-4.0/javaagent/build.gradle.kts @@ -15,68 +15,14 @@ dependencies { library("io.vertx:vertx-sql-client:4.0.0") compileOnly("io.vertx:vertx-codegen:4.0.0") - // for hibernateReactive2Test - testInstrumentation(project(":instrumentation:hibernate:hibernate-6.0:javaagent")) testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent")) testLibrary("io.vertx:vertx-pg-client:4.0.0") testLibrary("io.vertx:vertx-codegen:4.0.0") } -val latestDepTest = findProperty("testLatestDeps") as Boolean - -testing { - suites { - val hibernateReactive1Test by registering(JvmTestSuite::class) { - dependencies { - implementation("org.testcontainers:testcontainers") - if (latestDepTest) { - implementation("org.hibernate.reactive:hibernate-reactive-core:1.+") - implementation("io.vertx:vertx-pg-client:+") - } else { - implementation("org.hibernate.reactive:hibernate-reactive-core:1.0.0.Final") - implementation("io.vertx:vertx-pg-client:4.1.5") - } - } - } - - val hibernateReactive2Test by registering(JvmTestSuite::class) { - dependencies { - implementation("org.testcontainers:testcontainers") - if (latestDepTest) { - implementation("org.hibernate.reactive:hibernate-reactive-core:2.+") - implementation("io.vertx:vertx-pg-client:+") - } else { - implementation("org.hibernate.reactive:hibernate-reactive-core:2.0.0.Final") - implementation("io.vertx:vertx-pg-client:4.4.2") - } - } - } - } -} - tasks { withType().configureEach { usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) } - named("compileHibernateReactive2TestJava", JavaCompile::class).configure { - options.release.set(11) - } - val testJavaVersion = - gradle.startParameter.projectProperties.get("testJavaVersion")?.let(JavaVersion::toVersion) - ?: JavaVersion.current() - if (testJavaVersion.isJava8) { - named("hibernateReactive2Test", Test::class).configure { - enabled = false - } - if (latestDepTest) { - named("hibernateReactive1Test", Test::class).configure { - enabled = false - } - } - } - - check { - dependsOn(testing.suites) - } } diff --git a/settings.gradle.kts b/settings.gradle.kts index ffe25b100672..9cf667cfd7e9 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -254,6 +254,7 @@ include(":instrumentation:hibernate:hibernate-6.0:javaagent") include(":instrumentation:hibernate:hibernate-6.0:spring-testing") include(":instrumentation:hibernate:hibernate-common:javaagent") include(":instrumentation:hibernate:hibernate-procedure-call-4.3:javaagent") +include(":instrumentation:hibernate:hibernate-reactive:javaagent") include(":instrumentation:hikaricp-3.0:javaagent") include(":instrumentation:hikaricp-3.0:library") include(":instrumentation:hikaricp-3.0:testing") From cfff0261a39e93fc9c2af3357a669faf997549f1 Mon Sep 17 00:00:00 2001 From: Lauri Tulmin Date: Fri, 25 Aug 2023 14:38:48 +0300 Subject: [PATCH 2/2] address review comments --- .../javaagent/build.gradle.kts | 0 .../hibernate/reactive/v1_0/HibernateReactiveTest.java | 0 .../instrumentation/hibernate/reactive/v1_0/Value.java | 0 .../resources/META-INF/persistence.xml | 0 .../hibernate/reactive/v2_0/HibernateReactiveTest.java | 0 .../instrumentation/hibernate/reactive/v2_0/Value.java | 0 .../resources/META-INF/persistence.xml | 0 .../hibernate/reactive/v1_0}/ContextOperator.java | 2 +- .../hibernate/reactive/v1_0}/FunctionWrapper.java | 2 +- .../v1_0}/HibernateReactiveInstrumentationModule.java | 10 ++-------- .../v1_0}/MutinySessionFactoryInstrumentation.java | 2 +- .../v1_0}/StageSessionFactoryInstrumentation.java | 2 +- settings.gradle.kts | 2 +- 13 files changed, 7 insertions(+), 13 deletions(-) rename instrumentation/hibernate/{hibernate-reactive => hibernate-reactive-1.0}/javaagent/build.gradle.kts (100%) rename instrumentation/hibernate/{hibernate-reactive => hibernate-reactive-1.0}/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java (100%) rename instrumentation/hibernate/{hibernate-reactive => hibernate-reactive-1.0}/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java (100%) rename instrumentation/hibernate/{hibernate-reactive => hibernate-reactive-1.0}/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml (100%) rename instrumentation/hibernate/{hibernate-reactive => hibernate-reactive-1.0}/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java (100%) rename instrumentation/hibernate/{hibernate-reactive => hibernate-reactive-1.0}/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java (100%) rename instrumentation/hibernate/{hibernate-reactive => hibernate-reactive-1.0}/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml (100%) rename instrumentation/hibernate/{hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive => hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0}/ContextOperator.java (99%) rename instrumentation/hibernate/{hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive => hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0}/FunctionWrapper.java (98%) rename instrumentation/hibernate/{hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive => hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0}/HibernateReactiveInstrumentationModule.java (80%) rename instrumentation/hibernate/{hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive => hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0}/MutinySessionFactoryInstrumentation.java (99%) rename instrumentation/hibernate/{hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive => hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0}/StageSessionFactoryInstrumentation.java (99%) diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/build.gradle.kts b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/build.gradle.kts similarity index 100% rename from instrumentation/hibernate/hibernate-reactive/javaagent/build.gradle.kts rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/build.gradle.kts diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java similarity index 100% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveTest.java diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java similarity index 100% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive1Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/Value.java diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml similarity index 100% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive1Test/resources/META-INF/persistence.xml diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java similarity index 100% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/HibernateReactiveTest.java diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java similarity index 100% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive2Test/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v2_0/Value.java diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml similarity index 100% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/hibernateReactive2Test/resources/META-INF/persistence.xml diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/ContextOperator.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/ContextOperator.java similarity index 99% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/ContextOperator.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/ContextOperator.java index c4a6c8022db0..048c64f43a10 100644 --- a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/ContextOperator.java +++ b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/ContextOperator.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; import io.opentelemetry.context.Context; import io.opentelemetry.context.Scope; diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/FunctionWrapper.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/FunctionWrapper.java similarity index 98% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/FunctionWrapper.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/FunctionWrapper.java index 0ee3c09569ec..b930d9fc8e73 100644 --- a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/FunctionWrapper.java +++ b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/FunctionWrapper.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; import io.opentelemetry.context.Context; import io.opentelemetry.context.Scope; diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/HibernateReactiveInstrumentationModule.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveInstrumentationModule.java similarity index 80% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/HibernateReactiveInstrumentationModule.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveInstrumentationModule.java index b2fe71a62cd8..3e032e91e16f 100644 --- a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/HibernateReactiveInstrumentationModule.java +++ b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/HibernateReactiveInstrumentationModule.java @@ -3,26 +3,20 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; import static java.util.Arrays.asList; import com.google.auto.service.AutoService; import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule; import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation; -import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties; import java.util.List; @AutoService(InstrumentationModule.class) public class HibernateReactiveInstrumentationModule extends InstrumentationModule { public HibernateReactiveInstrumentationModule() { - super("hibernate-reactive"); - } - - @Override - public boolean defaultEnabled(ConfigProperties config) { - return true; + super("hibernate-reactive", "hibernate-reactive-1.0"); } @Override diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/MutinySessionFactoryInstrumentation.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/MutinySessionFactoryInstrumentation.java similarity index 99% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/MutinySessionFactoryInstrumentation.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/MutinySessionFactoryInstrumentation.java index 1fd743a8a70d..b44473efedf8 100644 --- a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/MutinySessionFactoryInstrumentation.java +++ b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/MutinySessionFactoryInstrumentation.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; import static net.bytebuddy.matcher.ElementMatchers.nameStartsWith; import static net.bytebuddy.matcher.ElementMatchers.named; diff --git a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/StageSessionFactoryInstrumentation.java b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/StageSessionFactoryInstrumentation.java similarity index 99% rename from instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/StageSessionFactoryInstrumentation.java rename to instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/StageSessionFactoryInstrumentation.java index ae342a9f4446..e578c8e939b1 100644 --- a/instrumentation/hibernate/hibernate-reactive/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/StageSessionFactoryInstrumentation.java +++ b/instrumentation/hibernate/hibernate-reactive-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/hibernate/reactive/v1_0/StageSessionFactoryInstrumentation.java @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package io.opentelemetry.javaagent.instrumentation.hibernate.reactive; +package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; import static net.bytebuddy.matcher.ElementMatchers.named; import static net.bytebuddy.matcher.ElementMatchers.namedOneOf; diff --git a/settings.gradle.kts b/settings.gradle.kts index 9cf667cfd7e9..f226f7bc4576 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -254,7 +254,7 @@ include(":instrumentation:hibernate:hibernate-6.0:javaagent") include(":instrumentation:hibernate:hibernate-6.0:spring-testing") include(":instrumentation:hibernate:hibernate-common:javaagent") include(":instrumentation:hibernate:hibernate-procedure-call-4.3:javaagent") -include(":instrumentation:hibernate:hibernate-reactive:javaagent") +include(":instrumentation:hibernate:hibernate-reactive-1.0:javaagent") include(":instrumentation:hikaricp-3.0:javaagent") include(":instrumentation:hikaricp-3.0:library") include(":instrumentation:hikaricp-3.0:testing")