Skip to content

Commit 63a1bf8

Browse files
committed
[tracing] Update user info for OpenTelemetry
1 parent 68bf012 commit 63a1bf8

File tree

1 file changed

+25
-28
lines changed
  • java/server/src/org/openqa/selenium/grid/commands

1 file changed

+25
-28
lines changed
Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
Selenium Grid ships with support for distributed tracing, backed by
2-
the OpenTracing APIs. This allows admins and devops engineers to trace
3-
the flow of control through the Grid for each and every command.
2+
the OpenTelemetry APIs. This allows admins and devops engineers to
3+
trace the flow of control through the Grid for each and every command.
44

55
To enable this support, you must first provide a "Tracer"
6-
implementation that should be used. We use OpenTracing's own
7-
TracerResolver to find the Tracer to use, so if your chosen tracing
8-
library supports this mechanism to (and most do!) you should be good
9-
to go. If you are using the standalone selenium jar, updating the
10-
classpath to contain your tracer can be done using the `--ext` flag to
11-
selenium. As a worked example, using Jaeger as the tracing library and
12-
running on macOS or Linux:
6+
implementation that should be used. We use OpenTelemtry's own
7+
mechanisms for selecting the implementations, so if your chosen
8+
tracing library supports this you should be good to go. If you are
9+
using the standalone selenium jar, updating the classpath to contain
10+
your tracer can be done using the `--ext` flag to selenium.
11+
12+
As a worked example, using Jaeger as the tracing library and running
13+
on macOS or Linux:
1314

1415
```
1516
java -jar selenium.jar \
16-
--ext $(coursier fetch -p io.jaegertracing:jaeger-client:1.0.0) \
17+
--ext $(coursier fetch -p \
18+
io.opentelemetry:opentelemetry-exporters-jaeger:0.2.0 \
19+
io.grpc:grpc-okhttp:1.26.0) \
1720
standalone
1821
```
1922

@@ -29,40 +32,34 @@ this can be done via system properties. Modifying our example:
2932
```
3033
java -DJAEGER_SERVICE_NAME="selenium-standalone" \
3134
-DJAEGER_AGENT_HOST=localhost \
32-
-DJAEGER_AGENT_PORT=6831 \
33-
-DJAEGER_SAMPLER_TYPE=const \
34-
-DJAEGER_SAMPLER_PARAM=1 \
35+
-DJAEGER_AGENT_PORT=14250 \
3536
-jar selenium.jar \
36-
--ext $(coursier fetch -p io.jaegertracing:jaeger-client:1.0.0) \
37+
--ext $(coursier fetch -p \
38+
io.opentelemetry:opentelemetry-exporters-jaeger:0.2.0 \
39+
io.grpc:grpc-okhttp:1.26.0) \
3740
standalone
3841
```
3942

40-
There are other popular tracing libraries that are supported by
41-
OpenTracing, so please check their documentation for more information
42-
on how to configure them.
43-
4443
You will also need to be running a tracing server somewhere. In the
4544
case of Jaeger, you can do this using docker to fire up something
4645
locally:
4746

4847
```
49-
docker run --rm -it -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
50-
-p 5775:5775/udp \
51-
-p 6831:6831/udp \
52-
-p 6832:6832/udp \
53-
-p 5778:5778 \
48+
docker run --rm -it --name jaeger \
5449
-p 16686:16686 \
55-
-p 14268:14268 \
56-
-p 9411:9411 \
57-
jaegertracing/all-in-one:1.14
50+
-p 14250:14250 \
51+
jaegertracing/all-in-one:1.16
5852
```
5953

6054
Now run some tests, and then point a browser at
6155
http://localhost:16686/ to view the outputs.
6256

57+
There are other popular tracing libraries that are supported by
58+
OpenTelemetry, so please check their documentation for more
59+
information on how to configure them.
60+
6361
More information can be found at:
6462

65-
* OpenTracing: https://opentracing.io
66-
* TracerResolver: https://github.com/opentracing-contrib/java-tracerresolver
63+
* OpenTelemetry: https://opentelemetry.io
6764
* Jaeger: https://www.jaegertracing.io
6865
* Coursier: https://get-coursier.io

0 commit comments

Comments
 (0)