Skip to content

Commit d9a6cba

Browse files
committed
Adding comment for suppressing opamp-server request instrumentation
1 parent 69b9977 commit d9a6cba

File tree

1 file changed

+2
-0
lines changed
  • opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/http

1 file changed

+2
-0
lines changed

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/http/OkHttpSender.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ public CompletableFuture<Response> send(BodyWriter writer, int contentLength) {
4747
RequestBody body = new RawRequestBody(writer, contentLength, MEDIA_TYPE);
4848
builder.post(body);
4949

50+
// By suppressing instrumentations, we prevent automatic instrumentations for the okhttp request
51+
// that polls the opamp server.
5052
InstrumentationUtil.suppressInstrumentation(() -> doSendRequest(builder.build(), future));
5153

5254
return future;

0 commit comments

Comments
 (0)