github.com/waldiirawan/apm-agent-go/v2@v2.2.2/features/outcome.feature (about) 1 Feature: Outcome 2 3 Background: An agent with default configuration 4 Given an agent 5 6 # ---- user set outcome 7 8 Scenario: User set outcome on span has priority over instrumentation 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' 14 15 Scenario: User set outcome on transaction has priority over instrumentation 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' 21 22 # ---- span & transaction outcome from reported errors 23 24 Scenario: span with error 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' 29 30 Scenario: span without error 31 Given an active span 32 When the span ends 33 Then the span outcome is 'success' 34 35 Scenario: transaction with error 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' 40 41 Scenario: transaction without error 42 Given an active transaction 43 When the transaction ends 44 Then the transaction outcome is 'success' 45 46 # ---- HTTP 47 48 @http 49 Scenario Outline: HTTP transaction and span outcome 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>' 58 Examples: 59 | status | client | server | 60 | 100 | success | success | 61 | 200 | success | success | 62 | 300 | success | success | 63 | 400 | failure | success | 64 | 404 | failure | success | 65 | 500 | failure | failure | 66 | -1 | failure | failure | 67 # last row with negative status represents the case where the status is not available 68 # for example when an exception/error is thrown without status (IO error, redirect loop, ...) 69 70 # ---- gRPC 71 72 # reference spec : https://github.com/grpc/grpc/blob/master/doc/statuscodes.md 73 74 @grpc 75 Scenario Outline: gRPC transaction and span outcome 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>' 84 Examples: 85 | status | client | server | 86 | OK | success | success | 87 | CANCELLED | failure | success | 88 | UNKNOWN | failure | failure | 89 | INVALID_ARGUMENT | failure | success | 90 | DEADLINE_EXCEEDED | failure | failure | 91 | NOT_FOUND | failure | success | 92 | ALREADY_EXISTS | failure | success | 93 | PERMISSION_DENIED | failure | success | 94 | RESOURCE_EXHAUSTED | failure | failure | 95 | FAILED_PRECONDITION | failure | failure | 96 | ABORTED | failure | failure | 97 | OUT_OF_RANGE | failure | success | 98 | UNIMPLEMENTED | failure | success | 99 | INTERNAL | failure | failure | 100 | UNAVAILABLE | failure | failure | 101 | DATA_LOSS | failure | failure | 102 | UNAUTHENTICATED | failure | success | 103 | n/a | failure | failure | 104 # last row with 'n/a' status represents the case where status is not available