Skip to content

Commit

Permalink
feat: add support for structure logs (#2342)
Browse files Browse the repository at this point in the history
* add support for structure logs

Signed-off-by: drfaust92 <[email protected]>

* add support for structure logs

Signed-off-by: drfaust92 <[email protected]>

---------

Signed-off-by: drfaust92 <[email protected]>
  • Loading branch information
DrFaust92 authored Aug 9, 2024
1 parent 547f97e commit 68ebfe1
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Distributor/start-selenium-grid-distributor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions EventBus/start-selenium-grid-eventbus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions Hub/start-selenium-grid-hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions NodeBase/start-selenium-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions NodeDocker/start-selenium-grid-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions Router/start-selenium-grid-router.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions SessionQueue/start-selenium-grid-session-queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions Sessions/start-selenium-grid-sessions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions Standalone/start-selenium-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
5 changes: 5 additions & 0 deletions StandaloneDocker/start-selenium-grid-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ if [ ! -z "$SE_LOG_LEVEL" ]; then
SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"
fi

if [ ! -z "$SE_STRUCTURED_LOGS" ]; then
echo "Appending Selenium options: --structured-logs ${SE_STRUCTURED_LOGS}"
SE_OPTS="$SE_OPTS --structured-logs ${SE_STRUCTURED_LOGS}"
fi

if [ ! -z "$SE_EXTERNAL_URL" ]; then
echo "Appending Selenium options: --external-url ${SE_EXTERNAL_URL}"
SE_OPTS="$SE_OPTS --external-url ${SE_EXTERNAL_URL}"
Expand Down
1 change: 1 addition & 0 deletions charts/selenium-grid/templates/logging-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ metadata:
{{- end }}
data:
SE_LOG_LEVEL: "{{ default "INFO" .Values.global.seleniumGrid.logLevel }}"
SE_STRUCTURED_LOGS: "{{ default false .Values.global.seleniumGrid.structuredLogs }}"
{{- if (eq (include "seleniumGrid.enableTracing" .) "true") }}
SE_ENABLE_TRACING: "true"
SE_OTEL_TRACES_EXPORTER: {{ .Values.tracing.exporter | quote }}
Expand Down
2 changes: 2 additions & 0 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ global:
stdoutProbeLog: false
# specify how many old ReplicaSets for this Deployment you want to retain. The rest will be garbage-collected in the background.
revisionHistoryLimit: 10
# Whether to enable structured logging
structuredLogs: false

tls:
# Name of external secret containing the TLS certificate and key
Expand Down

0 comments on commit 68ebfe1

Please sign in to comment.