Skip to content

Commit

Permalink
handle null status description better
Browse files Browse the repository at this point in the history
  • Loading branch information
msarahan committed Oct 15, 2024
1 parent 8077472 commit 7a7e46f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions telemetry-summarize/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ runs:
export OTEL_SERVICE_NAME="$(cat job_info.json | jq -r '.name' )"
export job_traceparent="$(rapids-get-telemetry-traceparent "${OTEL_SERVICE_NAME}")"
status_description=$(cat job_info.json | jq '.conclusion')
if [ "$status_description" != "" ] && [ "$status_description" != "null" ]; then
status_description="--status-description ${status_description}"
fi
# Nest the steps under the job we just made a span for. This sets the parent span ID for us.
export TRACEPARENT=${job_traceparent}
Expand Down Expand Up @@ -70,6 +65,12 @@ runs:
echo "Final timestamp is ${last_timestamp}"
if [ "$status_description" != "" ] && [ "$status_description" != "null" ]; then
status_description="--status-description ${status_description}"
else
status_description=
fi
# This is (unintuitively) set here because we don't know the true end time until we
# go though the steps.
otel-cli span create \
Expand Down

0 comments on commit 7a7e46f

Please sign in to comment.