1
1
Feature : Outcome
2
2
3
+ Background : An agent with default configuration
4
+ Given an agent
5
+
3
6
# ---- user set outcome
4
7
5
8
Scenario : User set outcome on span has priority over instrumentation
6
- Given an agent
7
- And an active span
8
- And user sets span outcome to 'failure'
9
- And span terminates with outcome 'success'
10
- Then span outcome is 'failure'
9
+ Given an active span
10
+ And the agent sets the span outcome to 'success'
11
+ And a user sets the span outcome to 'failure'
12
+ When the span ends
13
+ Then the span outcome is 'failure'
11
14
12
15
Scenario : User set outcome on transaction has priority over instrumentation
13
- Given an agent
14
- And an active transaction
15
- And user sets transaction outcome to 'unknown'
16
- And transaction terminates with outcome 'failure'
17
- Then transaction outcome is 'unknown'
16
+ Given an active transaction
17
+ And the agent sets the transaction outcome to 'failure'
18
+ And a user sets the transaction outcome to 'unknown'
19
+ When the transaction ends
20
+ Then the transaction outcome is 'unknown'
18
21
19
22
# ---- span & transaction outcome from reported errors
20
23
21
24
Scenario : span with error
22
- Given an agent
23
- And an active span
24
- And span terminates with an error
25
- Then span outcome is 'failure'
25
+ Given an active span
26
+ And an error is reported to the span
27
+ When the span ends
28
+ Then the span outcome is 'failure'
26
29
27
30
Scenario : span without error
28
- Given an agent
29
- And an active span
30
- And span terminates without error
31
- Then span outcome is 'success'
31
+ Given an active span
32
+ When the span ends
33
+ Then the span outcome is 'success'
32
34
33
35
Scenario : transaction with error
34
- Given an agent
35
- And an active transaction
36
- And transaction terminates with an error
37
- Then transaction outcome is 'failure'
36
+ Given an active transaction
37
+ And an error is reported to the transaction
38
+ When the transaction ends
39
+ Then the transaction outcome is 'failure'
38
40
39
41
Scenario : transaction without error
40
- Given an agent
41
- And an active transaction
42
- And transaction terminates without error
43
- Then transaction outcome is 'success'
42
+ Given an active transaction
43
+ When the transaction ends
44
+ Then the transaction outcome is 'success'
44
45
45
46
# ---- HTTP
46
47
47
48
@http
48
49
Scenario Outline : HTTP transaction and span outcome
49
- Given an agent
50
- And an HTTP transaction with <status> response code
51
- Then transaction outcome is "<server>"
52
- Given an HTTP span with <status> response code
53
- Then span outcome is "<client>"
50
+ Given an active transaction
51
+ And a HTTP call is received that returns <status>
52
+ When the transaction ends
53
+ Then the transaction outcome is '<server>'
54
+ Given an active span
55
+ And a HTTP call is made that returns <status>
56
+ When the span ends
57
+ Then the span outcome is '<client>'
54
58
Examples :
55
59
| status | client | server |
56
60
| 100 | success | success |
@@ -69,11 +73,14 @@ Feature: Outcome
69
73
70
74
@grpc
71
75
Scenario Outline : gRPC transaction and span outcome
72
- Given an agent
73
- And a gRPC transaction with '<status>' status
74
- Then transaction outcome is "<server>"
75
- Given a gRPC span with '<status>' status
76
- Then span outcome is "<client>"
76
+ Given an active transaction
77
+ And a gRPC call is received that returns '<status>'
78
+ When the transaction ends
79
+ Then the transaction outcome is '<server>'
80
+ Given an active span
81
+ And a gRPC call is made that returns '<status>'
82
+ When the span ends
83
+ Then the span outcome is '<client>'
77
84
Examples :
78
85
| status | client | server |
79
86
| OK | success | success |
0 commit comments