-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows/action-test-smoke: Add a step to verify the jeager
Add a GitHub Action step to verify that Jeager actually receives the expected emitted traces, rather than just hoping they made it. It uses Jeager API to fetch the traces, and note that the limit=0 so that we can get all the operations. Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]> scripts/verify-jaeger-traces: Add a script to verify jeager traces Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]> rename scripts/setup-otel.sh -> scripts/setup-jeager-and-otel.sh Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]>
- Loading branch information
Showing
3 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
TRACE_DATA=$(curl -s "http://localhost:16686/api/traces?service=containerd&limit=0" \ | ||
| jq '[ .data[].spans[].operationName ]') | ||
|
||
REQUIRED_OPS=("task_create" "task_wait" "task_start" "task_delete" "task_state" "wait" "shutdown" "shim_main_inner") | ||
|
||
for op in "${REQUIRED_OPS[@]}"; do | ||
COUNT=$(echo "$TRACE_DATA" | jq --arg op "$op" '[ .[] | select(. == $op) ] | length') | ||
if [ "$COUNT" -eq 0 ]; then | ||
echo "Operation '$op' not found in Jaeger!" | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "All required operations found in Jaeger!" |