File tree Expand file tree Collapse file tree
gax-httpjson/src/main/java/com/google/api/gax/httpjson
gax/src/main/java/com/google/api/gax/tracing
java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,7 +111,6 @@ public void run() {
111111 if (cancelled ) {
112112 return ;
113113 }
114-
115114 httpResponse = httpRequest .execute ();
116115
117116 // Check if already cancelled before trying to construct and read the response
Original file line number Diff line number Diff line change @@ -80,8 +80,6 @@ public void end() {
8080 public void setAttribute (String key , Object value ) {
8181 if (value instanceof Long ) {
8282 span .setAttribute (key , (Long ) value );
83- } else if (value instanceof Integer ) {
84- span .setAttribute (key , ((Integer ) value ).longValue ());
8583 } else if (value instanceof String ) {
8684 span .setAttribute (key , (String ) value );
8785 } else {
Original file line number Diff line number Diff line change @@ -406,15 +406,6 @@ public void responseReceived() {
406406 totalReceivedMessages ++;
407407 }
408408
409- /** {@inheritDoc} */
410- @ Override
411- public void responseReceived (long responseSize ) {
412- responseReceived ();
413- span .putAttribute (
414- ObservabilityAttributes .HTTP_RESPONSE_BODY_SIZE ,
415- AttributeValue .longAttributeValue (responseSize ));
416- }
417-
418409 /** {@inheritDoc} */
419410 @ Override
420411 public void requestSent () {
Original file line number Diff line number Diff line change @@ -201,28 +201,6 @@ void testTracing_successfulEcho_httpjson() throws Exception {
201201 .getAttributes ()
202202 .get (AttributeKey .stringKey (ObservabilityAttributes .HTTP_URL_TEMPLATE_ATTRIBUTE )))
203203 .isEqualTo ("v1beta1/echo:echo" );
204- }
205- }
206-
207- @ Test
208- void testTracing_httpjson_bodySizes () throws Exception {
209- SpanTracerFactory tracingFactory =
210- new SpanTracerFactory (new OpenTelemetryTraceManager (openTelemetrySdk ));
211-
212- try (EchoClient client =
213- TestClientInitializer .createHttpJsonEchoClientOpentelemetry (tracingFactory )) {
214-
215- client .echo (EchoRequest .newBuilder ().setContent ("tracing-test" ).build ());
216-
217- List <SpanData > spans = spanExporter .getFinishedSpanItems ();
218- assertThat (spans ).isNotEmpty ();
219-
220- SpanData attemptSpan =
221- spans .stream ()
222- .filter (span -> span .getName ().equals ("Echo/Echo/attempt" ))
223- .findFirst ()
224- .orElseThrow (() -> new AssertionError ("Attempt span 'Echo/Echo/attempt' not found" ));
225-
226204 assertThat (
227205 attemptSpan
228206 .getAttributes ()
You can’t perform that action at this time.
0 commit comments