Skip to content

Conversation

@jaydeluca
Copy link
Member

Related to #14356

Adding in some extended timeouts and retries to try and make the overhead benchmark test setup more resilient. Adding this in allowed me to successfully run these locally.

I can reproduce the flakyness of the sonatype site by trying to access https://oss.sonatype.org/content/repositories/snapshots/io/opentelemetry/javaagent/opentelemetry-javaagent/maven-metadata.xml and seeing sporadic 502 gateway timeouts.

Here is the stack trace from when running it locally before applying the fix:

org.opentest4j.AssertionFailedError: Unhandled exception in release
	at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:42)
	at app//org.junit.jupiter.api.Assertions.fail(Assertions.java:150)
	at app//io.opentelemetry.OverheadTests.lambda$runTestConfig$2(OverheadTests.java:73)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)
	at [email protected]/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1116)
	at app//io.opentelemetry.OverheadTests.runTestConfig(OverheadTests.java:68)
	at app//io.opentelemetry.OverheadTests.lambda$runAllTestConfigurations$0(OverheadTests.java:61)
	at [email protected]/java.util.Optional.ifPresent(Optional.java:178)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)
	at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)
Caused by: java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:731)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:739)
	at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:159)
	at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:101)
	at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:114)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:98)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:101)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:85)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:74)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:208)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:160)
	at io.opentelemetry.agents.LatestAgentSnapshotResolver.fetchBodyFrom(LatestAgentSnapshotResolver.java:87)
	at io.opentelemetry.agents.LatestAgentSnapshotResolver.fetchBodyStringFrom(LatestAgentSnapshotResolver.java:77)
	at io.opentelemetry.agents.LatestAgentSnapshotResolver.fetchLatestSnapshotVersion(LatestAgentSnapshotResolver.java:70)
	at io.opentelemetry.agents.LatestAgentSnapshotResolver.resolve(LatestAgentSnapshotResolver.java:34)
	at io.opentelemetry.agents.AgentResolver.resolve(AgentResolver.java:28)
	at io.opentelemetry.containers.PetClinicRestContainer.build(PetClinicRestContainer.java:48)
	at io.opentelemetry.OverheadTests.runAppOnce(OverheadTests.java:86)
	at io.opentelemetry.OverheadTests.lambda$runTestConfig$2(OverheadTests.java:71)
	... 7 more

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another good option might be to build and use the javaagent from latest checkout, ./gradew :javaagent:assemble

cc @breedx-splk in case he remembers any reasons behind current strategy

@trask trask merged commit 86f0a59 into open-telemetry:main Aug 4, 2025
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants