Skip to content

Commit dce76b5

Browse files
committed
Removing client-side references to tracing. For now
1 parent 48c3eb6 commit dce76b5

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

java/client/src/org/openqa/selenium/remote/HttpCommandExecutor.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
import org.openqa.selenium.remote.http.HttpClient;
3737
import org.openqa.selenium.remote.http.HttpRequest;
3838
import org.openqa.selenium.remote.http.HttpResponse;
39-
import org.openqa.selenium.remote.tracing.DistributedTracer;
40-
import org.openqa.selenium.remote.tracing.HttpTracing;
41-
import org.openqa.selenium.remote.tracing.Span;
4239

4340
import java.io.IOException;
4441
import java.net.MalformedURLException;
@@ -130,8 +127,6 @@ public Response execute(Command command) throws IOException {
130127
}
131128
}
132129

133-
DistributedTracer tracer = DistributedTracer.getInstance();
134-
135130
if (NEW_SESSION.equals(command.getName())) {
136131
if (commandCodec != null) {
137132
throw new SessionNotCreatedException("Session already exists");
@@ -155,9 +150,8 @@ public Response execute(Command command) throws IOException {
155150
}
156151

157152
HttpRequest httpRequest = commandCodec.encode(command);
158-
try (Span span = tracer.createSpan(command.getName(), tracer.getActiveSpan())) {
153+
try {
159154
log(LogType.PROFILER, new HttpProfilerLogEntry(command.getName(), true));
160-
span.addTag("selenium-sessionid", String.valueOf(command.getSessionId()));
161155
HttpResponse httpResponse = client.execute(httpRequest);
162156
log(LogType.PROFILER, new HttpProfilerLogEntry(command.getName(), false));
163157

java/client/src/org/openqa/selenium/remote/ProtocolHandshake.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
import org.openqa.selenium.remote.http.HttpMethod;
3939
import org.openqa.selenium.remote.http.HttpRequest;
4040
import org.openqa.selenium.remote.http.HttpResponse;
41-
import org.openqa.selenium.remote.tracing.DistributedTracer;
42-
import org.openqa.selenium.remote.tracing.Span;
4341

4442
import java.io.BufferedInputStream;
4543
import java.io.IOException;
@@ -99,14 +97,12 @@ private Optional<Result> createSession(HttpClient client, InputStream newSession
9997

10098
HttpResponse response;
10199
long start = System.currentTimeMillis();
102-
DistributedTracer tracer = DistributedTracer.getInstance();
103-
try (Span span = tracer.createSpan("NEW_SESSION", tracer.getActiveSpan())) {
104-
request.setHeader(CONTENT_LENGTH, String.valueOf(size));
105-
request.setHeader(CONTENT_TYPE, JSON_UTF_8.toString());
106-
request.setContent(newSessionBlob);
107100

108-
response = client.execute(request);
109-
}
101+
request.setHeader(CONTENT_LENGTH, String.valueOf(size));
102+
request.setHeader(CONTENT_TYPE, JSON_UTF_8.toString());
103+
request.setContent(newSessionBlob);
104+
105+
response = client.execute(request);
110106
long time = System.currentTimeMillis() - start;
111107

112108
// Ignore the content type. It may not have been set. Strictly speaking we're not following the

java/client/src/org/openqa/selenium/remote/internal/OkHttpClient.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.openqa.selenium.remote.http.HttpClient;
2525
import org.openqa.selenium.remote.http.HttpRequest;
2626
import org.openqa.selenium.remote.http.HttpResponse;
27-
import org.openqa.selenium.remote.tracing.HttpTracing;
2827

2928
import okhttp3.ConnectionPool;
3029
import okhttp3.Credentials;
@@ -156,7 +155,7 @@ public HttpClient createClient(URL url) {
156155
: response;
157156
});
158157

159-
return HttpTracing.decorate(new OkHttpClient(client.build(), url));
158+
return new OkHttpClient(client.build(), url);
160159
}
161160
};
162161
}

0 commit comments

Comments
 (0)