feat(ci): OTEL timing receiver for check-dagger
Adds ci/otelrecv/main.go — a minimal OTLP HTTP/JSON trace receiver that listens on a random port (port 0) so parallel runs never collide. The check-dagger Taskfile task now starts the receiver in the background, passes the port via a mktemp file, runs dagger with OTEL env vars set, then prints a per-span timing report on shutdown. Falls back to plain dagger call when Go is not available (e.g. CI containers without Go). First run will show raw attribute keys so we can learn Dagger's exact telemetry format and refine the cached/live detection logic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f23328fd1f
commit
3471e1fd2c
+25
-2
@@ -252,9 +252,32 @@ tasks:
|
||||
- dagger call --progress=plain -q -m ci --source=. publish-website --ssh-key env:SSH_PRIVATE_KEY --ssh-user "$SSH_USER" --ssh-host "$SSH_HOST"
|
||||
|
||||
check-dagger:
|
||||
desc: Run full check suite via Dagger
|
||||
desc: Run full check suite via Dagger (with OTEL timing report if Go is available)
|
||||
cmds:
|
||||
- dagger call --progress=plain -q -m ci --source=. check
|
||||
- |
|
||||
if ! command -v go >/dev/null 2>&1; then
|
||||
dagger call --progress=plain -q -m ci --source=. check
|
||||
exit $?
|
||||
fi
|
||||
PORTFILE=$(mktemp)
|
||||
TIMINGFILE=$(mktemp)
|
||||
(cd ci && go run ./otelrecv/ --port-file="$PORTFILE") > "$TIMINGFILE" &
|
||||
RECV_PID=$!
|
||||
cleanup() {
|
||||
kill "$RECV_PID" 2>/dev/null
|
||||
wait "$RECV_PID" 2>/dev/null
|
||||
echo ""
|
||||
cat "$TIMINGFILE"
|
||||
rm -f "$PORTFILE" "$TIMINGFILE"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
until [ -s "$PORTFILE" ]; do sleep 0.05; done
|
||||
PORT=$(cat "$PORTFILE")
|
||||
RC=0
|
||||
OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:$PORT" \
|
||||
OTEL_EXPORTER_OTLP_PROTOCOL="http/json" \
|
||||
dagger call --progress=plain -q -m ci --source=. check || RC=$?
|
||||
exit $RC
|
||||
|
||||
integration-android:
|
||||
desc: UI integration tests on a connected Android emulator (Stalwart on host, emulator reaches it via 10.0.2.2)
|
||||
|
||||
Reference in New Issue
Block a user