Skip to content
3 changes: 0 additions & 3 deletions instrumentation/gwt-2.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ sourceSets {
java {
destinationDirectory.set(layout.buildDirectory.dir("testapp/classes"))
}
resources {
srcDirs("src/webapp")
}
compileClasspath = compileClasspath.plus(sourceSets.main.get().compileClasspath)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public abstract class AbstractHelidonTest extends AbstractHttpServerTest<WebServ

protected void configureRoutes(HttpRouting.Builder routing) {}

static void sendResponse(ServerResponse res, int status, String response) {
private static void sendResponse(ServerResponse res, int status, String response) {
sendResponse(res, status, emptyMap(), response);
}

static void sendResponse(ServerResponse res, int status, Map<String, String> headers) {
private static void sendResponse(ServerResponse res, int status, Map<String, String> headers) {
sendResponse(res, status, headers, "");
}

static void sendResponse(
private static void sendResponse(
ServerResponse res, int status, Map<String, String> headers, String response) {
res.header("Content-Type", "text/plain");
headers.forEach(res::header);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ private static class Parameter {
}
}

static void sessionAssertion(TraceAssert trace, String methodName, String resource) {
private static void sessionAssertion(TraceAssert trace, String methodName, String resource) {
trace.hasSpansSatisfyingExactly(
span -> span.hasName("parent").hasKind(SpanKind.INTERNAL).hasNoParent(),
span -> assertSessionSpan(span, trace.getSpan(0), "Session." + methodName + " " + resource),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

public class EntityNameUtil {

private EntityNameUtil() {}
public static Function<Object, String> bestGuessEntityName(SharedSessionContract session) {
return entity -> bestGuessEntityName(session, entity);
}

private static String bestGuessEntityName(SharedSessionContract session, Object entity) {
if (entity == null) {
Expand All @@ -28,7 +30,5 @@ private static String bestGuessEntityName(SharedSessionContract session, Object
return null;
}

public static Function<Object, String> bestGuessEntityName(SharedSessionContract session) {
return (entity) -> bestGuessEntityName(session, entity);
}
private EntityNameUtil() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

class EntityManagerTest extends AbstractHibernateTest {

static final EntityManagerFactory entityManagerFactory =
private static final EntityManagerFactory entityManagerFactory =
Persistence.createEntityManagerFactory("test-pu");

@AfterAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class SpringJpaTest {
@RegisterExtension
protected static final InstrumentationExtension testing = AgentInstrumentationExtension.create();

AnnotationConfigApplicationContext context =
private final AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext(PersistenceConfig.class);
CustomerRepository repo = context.getBean(CustomerRepository.class);
private final CustomerRepository repo = context.getBean(CustomerRepository.class);

@AfterEach
void closeContext() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ public HibernateInstrumentationModule() {

@Override
public ElementMatcher.Junction<ClassLoader> classLoaderMatcher() {
return hasClassesNamed(
// added in 6.0
"org.hibernate.query.spi.SqmQuery");
// added in 6.0
return hasClassesNamed("org.hibernate.query.spi.SqmQuery");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ public void transform(TypeTransformer transformer) {
getClass().getName() + "$GetTransactionAdvice");

transformer.applyAdviceToMethod(
returns(implementsInterface(named("org.hibernate.query.CommonQueryContract")))
.or(named("org.hibernate.query.spi.QueryImplementor")),
returns(implementsInterface(named("org.hibernate.query.CommonQueryContract"))),
getClass().getName() + "$GetQueryAdvice");
}

Expand Down
3 changes: 2 additions & 1 deletion instrumentation/hibernate/hibernate-6.0/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: This instrumentation enables spans for Hibernate ORM operations.
library_link: https://hibernate.org/
configurations:
- name: otel.instrumentation.hibernate.experimental-span-attributes
declarative_name: java.hibernate.experimental_span_attributes/development
description: Enables the experimental `hibernate.session_id` span attribute.
type: boolean
default: false
default: false
Loading