Skip to content

Commit 15a937f

Browse files
committed
Adding default request service to the builder
1 parent 5b8932d commit 15a937f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/OpampClientBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import com.github.f4b6a3.uuid.UuidCreator;
99
import com.google.errorprone.annotations.CanIgnoreReturnValue;
10+
import io.opentelemetry.opamp.client.internal.connectivity.http.OkHttpSender;
1011
import io.opentelemetry.opamp.client.internal.impl.OpampClientImpl;
1112
import io.opentelemetry.opamp.client.internal.impl.OpampClientState;
1213
import io.opentelemetry.opamp.client.internal.request.service.HttpRequestService;
@@ -37,9 +38,10 @@ public final class OpampClientBuilder {
3738
private final Map<String, AnyValue> identifyingAttributes = new HashMap<>();
3839
private final Map<String, AnyValue> nonIdentifyingAttributes = new HashMap<>();
3940
private long capabilities = 0;
41+
private RequestService service =
42+
HttpRequestService.create(OkHttpSender.create("http://localhost:4320/v1/opamp"));
4043
@Nullable private byte[] instanceUid;
4144
@Nullable private State.EffectiveConfig effectiveConfigState;
42-
@Nullable private RequestService service;
4345

4446
OpampClientBuilder() {}
4547

0 commit comments

Comments
 (0)