File tree Expand file tree Collapse file tree
ci/tests/tracing/scenarios Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 - key : Content-Type
1313 value : application/json
1414 specs :
15- - selector : span[tracetest.span.type="http" name="GET /test/" http.method="GET"]
15+ - selector : span[tracetest.span.type="http" name="GET /test/" http.request. method="GET"]
1616 name : Checking request and response body sizes
1717 assertions :
1818 - attr:http.request.body.size = 15 # {"foo": "bar"} = 15 bytes
Original file line number Diff line number Diff line change @@ -38,21 +38,21 @@ spec:
3838 request : " {\n \" name\" : \" tom\"\n }"
3939 auth : {}
4040 specs :
41- - selector : span[tracetest.span.type="http" name="POST /helloworld.Greeter/SayHello" http.method="POST"]
41+ - selector : span[tracetest.span.type="http" name="POST /helloworld.Greeter/SayHello" http.request. method="POST"]
4242 name : Check http span attributes
4343 assertions :
44- - attr:http.status_code = 200
45- - attr:http .scheme = "http"
46- - attr:http.method = "POST"
44+ - attr:http.response. status_code = 200
45+ - attr:url .scheme = "http"
46+ - attr:http.request. method = "POST"
4747 - attr:tracetest.span.type = "http"
4848 - selector : |-
4949 span[name = "POST /helloworld.Greeter/SayHello"]
5050 span[tracetest.span.type="general"]
5151 name: Check the middlewares executed
5252 assertions:
5353 - attr:tracetest.selected_spans.count = 4
54- - selector : span[tracetest.span.type="http" name="HTTP POST" http.method="POST"]
54+ - selector : span[tracetest.span.type="http" name="HTTP POST" http.request. method="POST"]
5555 name : Checking the h2c proxying
5656 assertions :
57- - attr:http.method = "POST"
58- - attr:http. url = "http://grpcapi:50051/helloworld.Greeter/SayHello"
57+ - attr:http.request. method = "POST"
58+ - attr:url.full = "http://grpcapi:50051/helloworld.Greeter/SayHello"
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ spec:
1414 value : Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0ZXN0LXVzZXItYWxpYXMiLCJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MzI1MDM2ODAwMDB9.E8aStwqiSQPAvQN80UboJBEWsSazDU_gEMqHNqeXPbc
1515 specs :
1616 - name : Test main span attributes
17- selector : span[tracetest.span.type="http" name="GET /test-jwt/ip" http.method="GET"]
17+ selector : span[tracetest.span.type="http" name="GET /test-jwt/ip" http.request. method="GET"]
1818 assertions :
19- - attr:http.method = "GET"
20- - attr:http.status_code = 200
19+ - attr:http.request. method = "GET"
20+ - attr:http.response. status_code = 200
2121 - attr:tyk.api.id = "jwt-test-api"
2222 - attr:tyk.api.name = "JWTTestAPI"
2323 - attr:tyk.api.orgid = "default"
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ spec:
1414 value : Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ0ZXN0LXVzZXItYWxpYXMiLCJpYXQiOjE3MDAwMDAwMDAsImV4cCI6MzI1MDM2ODAwMDB9.E8aStwqiSQPAvQN80UboJBEWsSazDU_gEMqHNqeXPbc
1515 specs :
1616 - name : Test main span attributes
17- selector : span[tracetest.span.type="http" name="GET /test-multiauth/ip" http.method="GET"]
17+ selector : span[tracetest.span.type="http" name="GET /test-multiauth/ip" http.request. method="GET"]
1818 assertions :
19- - attr:http.method = "GET"
20- - attr:http.status_code = 200
19+ - attr:http.request. method = "GET"
20+ - attr:http.response. status_code = 200
2121 - attr:tyk.api.id = "multiauth-test-api"
2222 - attr:tyk.api.name = "MultiAuthTestAPI"
2323 - name : Verify AuthORWrapper span has alias attribute from JWT
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ spec:
1313 - key : Content-Type
1414 value : application/json
1515 specs :
16- - selector : span[tracetest.span.type = "general" name="GraphqlEngine"] span[tracetest.span.type="http" name="HTTP POST" http.method="POST"]
16+ - selector : span[tracetest.span.type = "general" name="GraphqlEngine"] span[tracetest.span.type="http" name="HTTP POST" http.request. method="POST"]
1717 name : Upstream Request is valid
1818 assertions :
19- - attr:http.status_code = 200
20- - attr:http. url = "https://countries.trevorblades.com/"
21- - attr:http.method = "POST"
19+ - attr:http.response. status_code = 200
20+ - attr:url.full = "https://countries.trevorblades.com/"
21+ - attr:http.request. method = "POST"
2222 - selector : span[tracetest.span.type="general" name="GraphqlEngine"] span[tracetest.span.type="general"]
2323 name : Make sure there is no subspan for graphql engine
2424 assertions :
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ spec:
1313 - key : Content-Type
1414 value : application/json
1515 specs :
16- - selector : span[tracetest.span.type = "general" name = "ResolvePlan"] span[tracetest.span.type="http" name="HTTP POST" http.method="POST"]
16+ - selector : span[tracetest.span.type = "general" name = "ResolvePlan"] span[tracetest.span.type="http" name="HTTP POST" http.request. method="POST"]
1717 name : Should return 404 for upstream
1818 assertions :
19- - attr:http.status_code = 404
20- - attr:http. url = "http://httpbin:80/status/404"
19+ - attr:http.response. status_code = 404
20+ - attr:url.full = "http://httpbin:80/status/404"
2121 - selector : span[tracetest.span.type = "general" name = "GraphqlMiddleware Validation"] span[tracetest.span.type="general" name="GraphqlEngine"]
2222 name : Make sure Graphql Engine is a child of GraphqlMiddleware Validation
2323 assertions :
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ spec:
1313 - key : Content-Type
1414 value : application/json
1515 specs :
16- - selector : span[tracetest.span.type = "general" name="ResolvePlan"] span[tracetest.span.type="http" name="HTTP POST" http.method="POST"]
16+ - selector : span[tracetest.span.type = "general" name="ResolvePlan"] span[tracetest.span.type="http" name="HTTP POST" http.request. method="POST"]
1717 name : Upstream Request is valid
1818 assertions :
19- - attr:http.status_code = 200
20- - attr:http. url = "https://countries.trevorblades.com/"
21- - attr:http.method = "POST"
19+ - attr:http.response. status_code = 200
20+ - attr:url.full = "https://countries.trevorblades.com/"
21+ - attr:http.request. method = "POST"
2222 - selector : span[tracetest.span.type="general" name="GraphqlEngine"] span[tracetest.span.type="general"]
2323 name : Make sure there are 3 subspans for graphql engine
2424 assertions :
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ spec:
1313 - key : User-Agent
1414 value : Go-http-client/1.1
1515 specs :
16- - selector : span[tracetest.span.type="http" name="GET /test/ip" http.method="GET"]
16+ - selector : span[tracetest.span.type="http" name="GET /test/ip" http.request. method="GET"]
1717 name : Test main span attributes
1818 assertions :
19- - attr:http.method = "GET"
20- - attr:http.status_code = 200
21- - attr:http. user_agent = "Go-http-client/1.1"
22- - attr:http.wrote_bytes != 0
19+ - attr:http.request. method = "GET"
20+ - attr:http.response. status_code = 200
21+ - attr:user_agent.original = "Go-http-client/1.1"
22+ - attr:http.response.body.size != 0
2323 - attr:tracetest.span.type = "http"
2424 - attr:tyk.api.id = "3"
2525 - attr:tyk.api.name = "TestAPI"
Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ spec:
1313 value : application/json
1414 specs :
1515 - name : Check main span http attributes
16- selector : span[tracetest.span.type="http" name="GET /test/status/500" http.method="GET"]
16+ selector : span[tracetest.span.type="http" name="GET /test/status/500" http.request. method="GET"]
1717 assertions :
18- - attr:http.method = "GET"
19- - attr:http .scheme = "http"
20- - attr:http.status_code = 500
18+ - attr:http.request. method = "GET"
19+ - attr:url .scheme = "http"
20+ - attr:http.response. status_code = 500
2121 - attr:tyk.api.id = "3"
2222 - attr:tyk.api.name = "TestAPI"
2323 - attr:tyk.api.orgid = "default"
2929 assertions :
3030 - attr:tracetest.selected_spans.count = 4
3131 - name : Check the proxying request span
32- selector : span[tracetest.span.type="http" name="HTTP GET" http.method="GET"]
32+ selector : span[tracetest.span.type="http" name="HTTP GET" http.request. method="GET"]
3333 assertions :
34- - attr:http.status_code = 500
35- - attr:http. url = "http://httpbin:80/status/500"
34+ - attr:http.response. status_code = 500
35+ - attr:url.full = "http://httpbin:80/status/500"
3636 - attr:tracetest.span.parent_id != ""
Original file line number Diff line number Diff line change 1212 value : application/json
1313 specs :
1414 - name : Check if the main span executed 3 middleware
15- selector : " span[tracetest.span.type=\" http\" name=\" GET /test-auth/ip\" http.method=\" GET\" ]
15+ selector : " span[tracetest.span.type=\" http\" name=\" GET /test-auth/ip\" http.request. method=\" GET\" ]
1616 \n span[tracetest.span.type = \" general\" ]"
1717 assertions :
1818 - attr:tracetest.selected_spans.count = 3
@@ -22,10 +22,10 @@ spec:
2222 assertions :
2323 - attr:tracetest.selected_spans.count = 0
2424 - name : Check if the main attributes
25- selector : span[tracetest.span.type="http" name="GET /test-auth/ip" http.method="GET"]
25+ selector : span[tracetest.span.type="http" name="GET /test-auth/ip" http.request. method="GET"]
2626 assertions :
27- - attr:http.method = "GET"
28- - attr:http.status_code = 401
27+ - attr:http.request. method = "GET"
28+ - attr:http.response. status_code = 401
2929 - attr:tyk.api.id = "1"
3030 - attr:tyk.api.name = "AuthAPI"
3131 - attr:tyk.api.orgid = "default"
You can’t perform that action at this time.
0 commit comments