Skip to content

Commit 25d3be0

Browse files
committed
Fix Ratpack 1.7 exception mapper to return actual exception
1 parent 308b193 commit 25d3be0

File tree

4 files changed

+186
-7
lines changed

4 files changed

+186
-7
lines changed

CI-PLAN.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# CI Failure Analysis Plan
2+
3+
## Failed Jobs Summary
4+
- Job 1: test-latest-deps / testLatestDeps1 (job ID: 54300667681)
5+
- Job 2: test-latest-deps / testLatestDeps3 (job ID: 54300667687)
6+
- Job 3: common / test1 (job ID: 54300667788)
7+
- Job 4: common / test3 (job ID: 54300667793)
8+
9+
## Unique Failed Gradle Tasks
10+
**Note**: Spotless tasks are excluded from this analysis as they are formatting-only checks.
11+
12+
- [ ] Task: :instrumentation:ratpack:ratpack-1.7:javaagent:test
13+
- Seen in: common / test1 (multiple parameter variants), test-latest-deps / testLatestDeps1
14+
- Log files: /tmp/common-test1.log, /tmp/testLatestDeps1.log
15+
16+
- [ ] Task: :instrumentation:ratpack:ratpack-1.4:javaagent:test
17+
- Seen in: common / test3 (multiple parameter variants), test-latest-deps / testLatestDeps3
18+
- Log files: /tmp/common-test3.log, /tmp/testLatestDeps3.log
19+
20+
## Notes
21+
The failing jobs represent multiple matrix variants of the same Gradle tasks; job names listed here collapse duplicates that only differ by the matrix parameters noted in parentheses.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
2+
### HTTP Client Instrumentations
3+
4+
1. **Apache HttpClient 4.3** (`apache-httpclient-4.3/library`)
5+
- **Response Type:** `org.apache.http.HttpResponse` (framework class)
6+
- **Request Type:** `io.opentelemetry.instrumentation.apachehttpclient.v4_3.ApacheHttpClientRequest` (wrapper)
7+
8+
2. **Apache HttpClient 5.2** (`apache-httpclient-5.2/library`)
9+
- **Response Type:** `org.apache.hc.core5.http.HttpResponse` (framework class)
10+
- **Request Type:** `io.opentelemetry.instrumentation.apachehttpclient.v5_2.ApacheHttpClientRequest` (wrapper)
11+
12+
3. **Armeria Client 1.3** (`armeria-1.3/library`)
13+
- **Request Type:** `com.linecorp.armeria.client.ClientRequestContext` (framework class)
14+
- **Response Type:** `com.linecorp.armeria.common.logging.RequestLog` (framework class)
15+
16+
4. **Java HttpClient** (`java-http-client/library`)
17+
- **Request Type:** `java.net.http.HttpRequest` (JDK class)
18+
- **Response Type:** `java.net.http.HttpResponse<?>` (JDK class)
19+
20+
5. **Jetty HttpClient 9.2** (`jetty-httpclient-9.2/library`)
21+
- **Request Type:** `org.eclipse.jetty.client.api.Request` (framework class)
22+
- **Response Type:** `org.eclipse.jetty.client.api.Response` (framework class)
23+
24+
6. **Netty Client 4.1** (`netty-4.1/library`)
25+
- **Request Type:** `io.opentelemetry.instrumentation.netty.common.v4_0.HttpRequestAndChannel` (wrapper)
26+
- **Response Type:** `io.netty.handler.codec.http.HttpResponse` (framework class)
27+
28+
7. **OkHttp 3.0** (`okhttp-3.0/library`)
29+
- **Request Type:** `okhttp3.Interceptor.Chain` (framework class)
30+
- **Response Type:** `okhttp3.Response` (framework class)
31+
32+
8. **Spring Web 3.1** (`spring-web-3.1/library`)
33+
- **Request Type:** `org.springframework.http.HttpRequest` (framework class)
34+
- **Response Type:** `org.springframework.http.client.ClientHttpResponse` (framework class)
35+
36+
9. **Spring WebFlux Client 5.3** (`spring-webflux-5.3/library`)
37+
- **Request Type:** `org.springframework.web.reactive.function.client.ClientRequest` (framework class)
38+
- **Response Type:** `org.springframework.web.reactive.function.client.ClientResponse` (framework class)
39+
40+
### HTTP Server Instrumentations
41+
42+
1. **Armeria Server 1.3** (`armeria-1.3/library`)
43+
- **Request Type:** `com.linecorp.armeria.server.ServiceRequestContext` (framework class)
44+
- **Response Type:** `com.linecorp.armeria.common.logging.RequestLog` (framework class)
45+
46+
2. **Netty Server 4.1** (`netty-4.1/library`)
47+
- **Request Type:** `io.opentelemetry.instrumentation.netty.common.v4_0.HttpRequestAndChannel` (wrapper)
48+
- **Response Type:** `io.netty.handler.codec.http.HttpResponse` (framework class)
49+
50+
3. **Restlet 1.1 & 2.0** (`restlet-1.1/library`, `restlet-2.0/library`)
51+
- **Request Type:** `org.restlet.Request` (framework class)
52+
- **Response Type:** `org.restlet.Response` (framework class)
53+
54+
4. **Spring WebFlux Server 5.3** (`spring-webflux-5.3/library`)
55+
- **Both Types:** `org.springframework.web.server.ServerWebExchange` (framework class)
56+
57+
5. **Spring WebMVC 5.3** (`spring-webmvc-5.3/library`)
58+
- **Request Type:** `javax.servlet.http.HttpServletRequest` (framework class)
59+
- **Response Type:** `javax.servlet.http.HttpServletResponse` (framework class)
60+
61+
6. **Spring WebMVC 6.0** (`spring-webmvc-6.0/library`)
62+
- **Request Type:** `javax.servlet.http.HttpServletRequest` (framework class)
63+
- **Response Type:** `javax.servlet.http.HttpServletResponse` (framework class)

instrumentation/ratpack/ratpack-1.7/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/ratpack/v1_7/client/RatpackTestUtils.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@
55

66
package io.opentelemetry.javaagent.instrumentation.ratpack.v1_7.client;
77

8-
import io.netty.channel.ConnectTimeoutException;
9-
import io.netty.handler.codec.PrematureChannelClosureException;
108
import io.opentelemetry.instrumentation.test.utils.PortUtils;
119
import io.opentelemetry.instrumentation.testing.junit.http.HttpClientTestOptions;
1210
import java.net.URI;
13-
import java.nio.channels.ClosedChannelException;
1411
import ratpack.http.client.HttpClientReadTimeoutException;
1512

1613
public final class RatpackTestUtils {
@@ -23,10 +20,8 @@ public static Throwable ratpackClientSpanErrorMapper(URI uri, Throwable exceptio
2320
"Read timeout (PT2S) waiting on HTTP server at " + uri);
2421
}
2522
if (isNonRoutableAddress(uri)) {
26-
if (exception instanceof ClosedChannelException) {
27-
return new PrematureChannelClosureException();
28-
}
29-
return new ConnectTimeoutException("Connect timeout (PT2S) connecting to " + uri);
23+
// Both Windows and Linux produce ClosedChannelException for non-routable addresses
24+
return exception;
3025
}
3126
if (isUnopenedPort(uri)) {
3227
return exception;

test-progress.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Database Instrumentation Test Progress
2+
3+
Started: October 26, 2025
4+
Last Updated: Completed core validation, database integration tests require Docker/testcontainers
5+
6+
## Summary
7+
8+
Successfully ported PR #12605 ("Db network attributes") to db-networking-attributes branch.
9+
10+
### Changes Made
11+
12+
1. **Core API Updates** (instrumentation-api-incubator)
13+
- Modified `DbClientAttributesGetter` to extend `NetworkAttributesGetter` and `ServerAttributesGetter`
14+
- Added missing methods: `getDbQuerySummary()`, `getResponseStatus()`
15+
- Updated `DbClientAttributesExtractor` to use `InternalNetworkAttributesExtractor` and `ServerAttributesExtractor`
16+
- Fixed null handling for `dbSystem` before calling `SemconvStability.stableDbSystemName()`
17+
18+
2. **Database Instrumentation Updates**
19+
- **R2DBC**: Added `getServerAddress()` and `getServerPort()` to `R2dbcSqlAttributesGetter`
20+
- **Cassandra 3.0, 4.0, 4.4**: Added network methods to `CassandraSqlAttributesGetter` (3 versions)
21+
- **Jedis 4.0**: Added `getNetworkPeerInetSocketAddress()` to `JedisDbAttributesGetter`
22+
- **Couchbase**: Added `getNetworkPeerInetSocketAddress()` to `CouchbaseAttributesGetter`
23+
- **Redisson**: Added `getNetworkPeerInetSocketAddress()` to `RedissonDbAttributesGetter`
24+
- **JDBC**: Added `getServerAddress()` and `getServerPort()` to `JdbcAttributesGetter`
25+
26+
3. **Cleanup**
27+
- Deleted 9 standalone `NetworkAttributesGetter` classes
28+
- Updated all Singleton and Factory classes to remove `NetworkAttributesExtractor.create()` calls
29+
30+
## Test Results
31+
32+
### Completed
33+
**instrumentation-api-incubator** - PASSED (2m 43s)
34+
- All core API tests passed
35+
- Validates DbClientAttributesGetter interface changes
36+
- Validates DbClientAttributesExtractor behavior
37+
38+
### Not Completed
39+
**Cassandra 3.0** - Interrupted (requires Docker/testcontainers setup)
40+
- Test was pulling Docker images when interrupted
41+
- Testcontainers-based tests require longer execution time
42+
- Similar pattern expected for other database integration tests
43+
44+
## Validation Status
45+
46+
**Compilation**: All modules compile successfully
47+
**Core API Tests**: Pass (instrumentation-api-incubator)
48+
⏸️ **Integration Tests**: Require Docker environment and extended time (10-20+ minutes per module)
49+
50+
## Recommendations
51+
52+
The core refactoring has been successfully completed and validated:
53+
- Interface changes are correct and compile cleanly
54+
- Core API tests pass
55+
- Pattern is consistent across all database instrumentations
56+
57+
Integration tests (Cassandra, Couchbase, JDBC, etc.) require:
58+
- Docker environment for testcontainers
59+
- Extended time for container startup and test execution
60+
- Can be run individually or as part of CI pipeline
61+
62+
## Commits
63+
64+
1. `Consolidate network attribute extraction into DbClientAttributesGetter` - Initial port
65+
2. `Add missing methods to DbClientAttributesGetter and fix null handling` - Compilation fixes
66+
- [x] Cassandra 3.0 - PASSED
67+
- [x] Cassandra 4.0 - PASSED
68+
- [x] Cassandra 4.4 - PASSED
69+
- [x] Couchbase 2.0 - PASSED
70+
- [ ] Elasticsearch REST
71+
- [ ] Elasticsearch Transport
72+
- [ ] Geode
73+
- [ ] InfluxDB
74+
- [ ] JDBC
75+
- [x] Jedis 1.4 - PASSED
76+
- [ ] Jedis 3.0
77+
- [ ] Jedis 4.0
78+
- [ ] Lettuce 4.0
79+
- [ ] Lettuce 5.0
80+
- [ ] Lettuce 5.1
81+
- [ ] Mongo 3.1
82+
- [ ] OpenSearch
83+
- [x] R2DBC 1.0 - PASSED
84+
- [ ] Rediscala
85+
- [ ] Redisson
86+
- [ ] Spymemcached
87+
- [ ] Vertx Redis Client
88+
- [ ] Vertx SQL Client
89+
90+
### Completed Tests
91+
None yet
92+
93+
### Failed Tests
94+
None yet
95+
96+
## Issues Found and Fixed
97+
None yet
98+
99+
## Notes
100+
Starting test execution...

0 commit comments

Comments
 (0)