Skip to content

Commit b49b13b

Browse files
authored
update: Tracing is enabled by default (#2347)
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 821eff3 commit b49b13b

15 files changed

+97
-16
lines changed

Base/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ ENV SE_BIND_HOST=false \
159159
SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED=true \
160160
SE_OTEL_TRACES_EXPORTER="otlp" \
161161
SE_SUPERVISORD_LOG_LEVEL="info" \
162+
SE_LOG_LEVEL="INFO" \
163+
SE_HTTP_LOGS=false \
164+
SE_STRUCTURED_LOGS=false \
165+
SE_ENABLE_TRACING=true \
162166
SE_ENABLE_TLS=false \
163167
SE_JAVA_SSL_TRUST_STORE="/opt/selenium/secrets/server.jks" \
164168
SE_JAVA_SSL_TRUST_STORE_PASSWORD="/opt/selenium/secrets/server.pass" \

Distributor/start-selenium-grid-distributor.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
5959
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
6060
fi
6161

62+
if [ ! -z "$SE_HTTP_LOGS" ]; then
63+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
64+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
65+
fi
66+
6267
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
6368
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
6469
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -136,6 +141,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
136141
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
137142
fi
138143
else
144+
SE_OPTS="$SE_OPTS --tracing false"
145+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
139146
echo "Tracing is disabled"
140147
fi
141148

EventBus/start-selenium-grid-eventbus.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
2424
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
2525
fi
2626

27+
if [ ! -z "$SE_HTTP_LOGS" ]; then
28+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
29+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
30+
fi
31+
2732
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
2833
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
2934
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -86,6 +91,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
8691
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
8792
fi
8893
else
94+
SE_OPTS="$SE_OPTS --tracing false"
95+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
8996
echo "Tracing is disabled"
9097
fi
9198

Hub/start-selenium-grid-hub.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
2727
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
2828
fi
2929

30+
if [ ! -z "$SE_HTTP_LOGS" ]; then
31+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
32+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
33+
fi
34+
3035
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
3136
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
3237
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -119,6 +124,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
119124
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
120125
fi
121126
else
127+
SE_OPTS="$SE_OPTS --tracing false"
128+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
122129
echo "Tracing is disabled"
123130
fi
124131

NodeBase/start-selenium-node.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
6666
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
6767
fi
6868

69+
if [ ! -z "$SE_HTTP_LOGS" ]; then
70+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
71+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
72+
fi
73+
6974
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
7075
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
7176
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -139,6 +144,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
139144
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
140145
fi
141146
else
147+
SE_OPTS="$SE_OPTS --tracing false"
148+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
142149
echo "Tracing is disabled"
143150
fi
144151

NodeDocker/start-selenium-grid-docker.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
3434
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
3535
fi
3636

37+
if [ ! -z "$SE_HTTP_LOGS" ]; then
38+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
39+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
40+
fi
41+
3742
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
3843
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
3944
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -96,6 +101,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
96101
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
97102
fi
98103
else
104+
SE_OPTS="$SE_OPTS --tracing false"
105+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
99106
echo "Tracing is disabled"
100107
fi
101108

Router/start-selenium-grid-router.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
5959
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
6060
fi
6161

62+
if [ ! -z "$SE_HTTP_LOGS" ]; then
63+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
64+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
65+
fi
66+
6267
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
6368
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
6469
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -141,6 +146,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
141146
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
142147
fi
143148
else
149+
SE_OPTS="$SE_OPTS --tracing false"
150+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
144151
echo "Tracing is disabled"
145152
fi
146153

SessionQueue/start-selenium-grid-session-queue.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
2424
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
2525
fi
2626

27+
if [ ! -z "$SE_HTTP_LOGS" ]; then
28+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
29+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
30+
fi
31+
2732
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
2833
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
2934
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -91,6 +96,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
9196
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
9297
fi
9398
else
99+
SE_OPTS="$SE_OPTS --tracing false"
100+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
94101
echo "Tracing is disabled"
95102
fi
96103

Sessions/start-selenium-grid-sessions.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
3939
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
4040
fi
4141

42+
if [ ! -z "$SE_HTTP_LOGS" ]; then
43+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
44+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
45+
fi
46+
4247
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
4348
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
4449
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -106,6 +111,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
106111
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
107112
fi
108113
else
114+
SE_OPTS="$SE_OPTS --tracing false"
115+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
109116
echo "Tracing is disabled"
110117
fi
111118

Standalone/start-selenium-standalone.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
6666
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
6767
fi
6868

69+
if [ ! -z "$SE_HTTP_LOGS" ]; then
70+
echo "Appending Selenium options: --http-logs ${SE_HTTP_LOGS}"
71+
SE_OPTS="$SE_OPTS --http-logs ${SE_HTTP_LOGS}"
72+
fi
73+
6974
if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
7075
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
7176
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
@@ -145,6 +150,8 @@ if [ "$SE_ENABLE_TRACING" = "true" ]; then
145150
SE_JAVA_OPTS="$SE_JAVA_OPTS ${SE_OTEL_JVM_ARGS}"
146151
fi
147152
else
153+
SE_OPTS="$SE_OPTS --tracing false"
154+
SE_JAVA_OPTS="$SE_JAVA_OPTS -Dwebdriver.remote.enableTracing=false"
148155
echo "Tracing is disabled"
149156
fi
150157

0 commit comments

Comments
 (0)