Skip to content

Commit

Permalink
Update wait_for_es_transaction.bash
Browse files Browse the repository at this point in the history
  • Loading branch information
jackshirazi authored Nov 28, 2024
1 parent 2b3de37 commit 6feb583
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/operator/utilities/wait_for_es_transaction.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ count=0
while [ $count -lt $MAX_WAIT_SECONDS ]
do
count=`expr $count + 1`
curl -m 2 "$URL/traces*/_search" -H "Content-Type: application/json" -d '{"query": {"range": {"@timestamp": {"gte": "now-1h","lte": "now"}}}}' > query.output
#curl -m 2 "$URL/traces*/_search" -H "Content-Type: application/json" -d '{"query": {"range": {"@timestamp": {"gte": "now-1h","lte": "now"}}}}' > query.output
curl -m 2 "$URL/traces*/_search" -H "Content-Type: application/json" -d '{"query": {"bool": {"must": [{"range": {"@timestamp": {"gte": "now-1h","lte": "now"}}},{"match": {"resource.attributes.service.name": "java-test-app"}}]}}' > query.output
DETECTED_SERVICE=$(jq '.hits.hits[0]._source.resource.attributes."service.name"' query.output | tr -d '"')
if [ "x$DETECTED_SERVICE" = "x$SERVICE_NAME" ]
then
Expand Down

0 comments on commit 6feb583

Please sign in to comment.