Split hibernate reactive instrumentation (#9531)

This commit is contained in:
Lauri Tulmin 2023-09-21 18:54:05 +03:00 committed by GitHub
parent e73118b434
commit edb0db39d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 37 additions and 14 deletions

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0.mutiny;
import io.opentelemetry.context.Context; import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope; import io.opentelemetry.context.Scope;

View File

@ -0,0 +1,26 @@
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0.mutiny;
import static java.util.Collections.singletonList;
import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import java.util.List;
@AutoService(InstrumentationModule.class)
public class HibernateReactiveMutinyInstrumentationModule extends InstrumentationModule {
public HibernateReactiveMutinyInstrumentationModule() {
super("hibernate-reactive", "hibernate-reactive-1.0", "hibernate-reactive-mutiny");
}
@Override
public List<TypeInstrumentation> typeInstrumentations() {
return singletonList(new MutinySessionFactoryInstrumentation());
}
}

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0.mutiny;
import static net.bytebuddy.matcher.ElementMatchers.nameStartsWith; import static net.bytebuddy.matcher.ElementMatchers.nameStartsWith;
import static net.bytebuddy.matcher.ElementMatchers.named; import static net.bytebuddy.matcher.ElementMatchers.named;

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0.stage;
import io.opentelemetry.context.Context; import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope; import io.opentelemetry.context.Scope;

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0.stage;
import io.opentelemetry.context.Context; import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope; import io.opentelemetry.context.Scope;

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0.stage;
import static java.util.Arrays.asList; import static java.util.Arrays.asList;
@ -13,17 +13,14 @@ import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import java.util.List; import java.util.List;
@AutoService(InstrumentationModule.class) @AutoService(InstrumentationModule.class)
public class HibernateReactiveInstrumentationModule extends InstrumentationModule { public class HibernateReactiveStageInstrumentationModule extends InstrumentationModule {
public HibernateReactiveInstrumentationModule() { public HibernateReactiveStageInstrumentationModule() {
super("hibernate-reactive", "hibernate-reactive-1.0"); super("hibernate-reactive", "hibernate-reactive-1.0", "hibernate-reactive-stage");
} }
@Override @Override
public List<TypeInstrumentation> typeInstrumentations() { public List<TypeInstrumentation> typeInstrumentations() {
return asList( return asList(new StageSessionFactoryInstrumentation(), new StageSessionImplInstrumentation());
new StageSessionFactoryInstrumentation(),
new StageSessionImplInstrumentation(),
new MutinySessionFactoryInstrumentation());
} }
} }

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0.stage;
import static net.bytebuddy.matcher.ElementMatchers.named; import static net.bytebuddy.matcher.ElementMatchers.named;
import static net.bytebuddy.matcher.ElementMatchers.namedOneOf; import static net.bytebuddy.matcher.ElementMatchers.namedOneOf;

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0; package io.opentelemetry.javaagent.instrumentation.hibernate.reactive.v1_0.stage;
import static net.bytebuddy.matcher.ElementMatchers.named; import static net.bytebuddy.matcher.ElementMatchers.named;
import static net.bytebuddy.matcher.ElementMatchers.namedOneOf; import static net.bytebuddy.matcher.ElementMatchers.namedOneOf;