Skip to content

Commit 9f6055d

Browse files
crossoverJieasweet-confluent
authored andcommitted
fix ci
1 parent d17a36c commit 9f6055d

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Comparing source compatibility of opentelemetry-instrumentation-api-2.19.0-SNAPSHOT.jar against opentelemetry-instrumentation-api-2.18.1.jar
2-
No changes.
2+
No changes.

instrumentation/grpc-1.6/testing/src/main/java/io/opentelemetry/instrumentation/grpc/v1_6/AbstractGrpcStreamingTest.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import io.grpc.ServerBuilder;
2929
import io.grpc.Status;
3030
import io.grpc.stub.StreamObserver;
31+
import io.opentelemetry.api.common.AttributeKey;
3132
import io.opentelemetry.api.trace.Span;
3233
import io.opentelemetry.api.trace.SpanKind;
3334
import io.opentelemetry.api.trace.Tracer;
@@ -52,6 +53,15 @@
5253

5354
public abstract class AbstractGrpcStreamingTest {
5455

56+
private static final AttributeKey<Long> RPC_CLIENT_REQUEST_BODY_SIZE =
57+
AttributeKey.longKey("rpc.client.request.body.size");
58+
private static final AttributeKey<Long> RPC_CLIENT_RESPONSE_BODY_SIZE =
59+
AttributeKey.longKey("rpc.client.response.body.size");
60+
private static final AttributeKey<Long> RPC_SERVER_REQUEST_BODY_SIZE =
61+
AttributeKey.longKey("rpc.server.request.body.size");
62+
private static final AttributeKey<Long> RPC_SERVER_RESPONSE_BODY_SIZE =
63+
AttributeKey.longKey("rpc.server.response.body.size");
64+
5565
protected abstract ServerBuilder<?> configureServer(ServerBuilder<?> server);
5666

5767
protected abstract ManagedChannelBuilder<?> configureClient(ManagedChannelBuilder<?> client);
@@ -159,6 +169,9 @@ public void onCompleted() {
159169
.sorted()
160170
.collect(Collectors.toList()));
161171

172+
Helloworld.Response message = Helloworld.Response.newBuilder().setMessage("call " + 1).build();
173+
int requestSerializedSize = message.getSerializedSize();
174+
162175
List<Consumer<EventData>> clientEvents = new ArrayList<>();
163176
List<Consumer<EventData>> serverEvents = new ArrayList<>();
164177
for (long i = 0; i < clientMessageCount; i++) {
@@ -229,6 +242,8 @@ public void onCompleted() {
229242
equalTo(RPC_GRPC_STATUS_CODE, (long) Status.Code.OK.value()),
230243
equalTo(SERVER_ADDRESS, "localhost"),
231244
equalTo(SERVER_PORT, (long) server.getPort())))
245+
equalTo(RPC_CLIENT_RESPONSE_BODY_SIZE, requestSerializedSize),
246+
equalTo(RPC_CLIENT_REQUEST_BODY_SIZE, requestSerializedSize),
232247
.satisfies(
233248
spanData ->
234249
assertThat(spanData.getEvents())
@@ -246,6 +261,8 @@ public void onCompleted() {
246261
equalTo(SERVER_PORT, server.getPort()),
247262
equalTo(NETWORK_TYPE, "ipv4"),
248263
equalTo(NETWORK_PEER_ADDRESS, "127.0.0.1"),
264+
equalTo(RPC_SERVER_REQUEST_BODY_SIZE, requestSerializedSize),
265+
equalTo(RPC_SERVER_RESPONSE_BODY_SIZE, requestSerializedSize),
249266
satisfies(NETWORK_PEER_PORT, val -> assertThat(val).isNotNull()))
250267
.satisfies(
251268
spanData ->

0 commit comments

Comments
 (0)