-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
50 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
# 0.3.0 | ||
|
||
- `service.name` must be sent vs `service_name` now for consistency | ||
- a `PATCH` to update the `ttl` will extend from the current span duration. e.g. patching 10000 to a span that has been running for 34125ms will set the ttl to 44125 | ||
- added `test.sh` to run through the operations and expiration behaviour | ||
|
||
# 0.2.1 | ||
|
||
- API changed to use HTTP verbs for crud | ||
|
||
# 0.1.0 | ||
|
||
- First release |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "testevents" | ||
version = "0.2.1" | ||
version = "0.3.0" | ||
edition = "2021" | ||
authors = ["Jeremy Blythe <[email protected]>"] | ||
repository = "https://github.com/jerbly/testevents" | ||
|
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
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,25 @@ | ||
#!/bin/bash | ||
url="http://localhost:3003" | ||
|
||
echo "Make a root span" | ||
response=$(curl -s -X POST $url/ -H 'Content-Type: application/json' -d '{"service.name":"jerbly-test","name":"test","hello":"world","ttl":3600000}') | ||
root_span_id=$(echo $response | jq -r '.span_id') | ||
root_trace_id=$(echo $response | jq -r '.trace_id') | ||
sleep 1 | ||
|
||
echo "Make a child span" | ||
response=$(curl -s -X POST $url/$root_trace_id/$root_span_id/ -H 'Content-Type: application/json' -d '{"service.name":"jerbly-test","name":"child","ttl":3600000}') | ||
span_id=$(echo $response | jq -r '.span_id') | ||
sleep 1 | ||
|
||
echo "Patch the child span with a new value and a shorter ttl - and let it timeout" | ||
curl -s -X PATCH $url/$root_trace_id/$span_id/ -H 'Content-Type: application/json' -d '{"new":true,"ttl":1000}' | ||
sleep 2 | ||
|
||
echo "" | ||
echo "Check for a 404 on an attempt to DELETE the expired child span" | ||
response=$(curl -s -o /dev/null -w "%{http_code}" -X DELETE $url/$root_trace_id/$span_id/) | ||
echo "Status code: $response" | ||
|
||
echo "Close the root span" | ||
curl -s -X DELETE $url/$root_trace_id/$root_span_id/ |