|
| 1 | +-include_lib("rabbit/include/rabbit_global_counters.hrl"). |
| 2 | + |
1 | 3 | -define(TABLE_CONSUMER, rabbit_stream_consumer_created). |
2 | 4 | -define(TABLE_PUBLISHER, rabbit_stream_publisher_created). |
| 5 | + |
| 6 | +-define(STREAM_DOES_NOT_EXIST, ?NUM_PROTOCOL_COUNTERS + 1). |
| 7 | +-define(SUBSCRIPTION_ID_ALREADY_EXISTS, ?NUM_PROTOCOL_COUNTERS + 2). |
| 8 | +-define(SUBSCRIPTION_ID_DOES_NOT_EXIST, ?NUM_PROTOCOL_COUNTERS + 3). |
| 9 | +-define(STREAM_ALREADY_EXISTS, ?NUM_PROTOCOL_COUNTERS + 4). |
| 10 | +-define(STREAM_NOT_AVAILABLE, ?NUM_PROTOCOL_COUNTERS + 5). |
| 11 | +-define(SASL_MECHANISM_NOT_SUPPORTED, ?NUM_PROTOCOL_COUNTERS + 6). |
| 12 | +-define(AUTHENTICATION_FAILURE, ?NUM_PROTOCOL_COUNTERS + 7). |
| 13 | +-define(SASL_ERROR, ?NUM_PROTOCOL_COUNTERS + 8). |
| 14 | +-define(SASL_CHALLENGE, ?NUM_PROTOCOL_COUNTERS + 9). |
| 15 | +-define(SASL_AUTHENTICATION_FAILURE_LOOPBACK, ?NUM_PROTOCOL_COUNTERS + 10). |
| 16 | +-define(VHOST_ACCESS_FAILURE, ?NUM_PROTOCOL_COUNTERS + 11). |
| 17 | +-define(UNKNOWN_FRAME, ?NUM_PROTOCOL_COUNTERS + 12). |
| 18 | +-define(FRAME_TOO_LARGE, ?NUM_PROTOCOL_COUNTERS + 13). |
| 19 | +-define(INTERNAL_ERROR, ?NUM_PROTOCOL_COUNTERS + 14). |
| 20 | +-define(ACCESS_REFUSED, ?NUM_PROTOCOL_COUNTERS + 15). |
| 21 | +-define(PRECONDITION_FAILED, ?NUM_PROTOCOL_COUNTERS + 16). |
| 22 | +-define(PUBLISHER_DOES_NOT_EXIST, ?NUM_PROTOCOL_COUNTERS + 17). |
| 23 | + |
| 24 | +-define(PROTOCOL_COUNTERS, |
| 25 | + [ |
| 26 | + { |
| 27 | + stream_error_stream_does_not_exist_total, ?STREAM_DOES_NOT_EXIST, counter, |
| 28 | + "Total number of commands rejected with stream does not exist error" |
| 29 | + }, |
| 30 | + { |
| 31 | + stream_error_subscription_id_already_exists_total, ?SUBSCRIPTION_ID_ALREADY_EXISTS, counter, |
| 32 | + "Total number of commands failed with subscription id already exists" |
| 33 | + }, |
| 34 | + { |
| 35 | + stream_error_subscription_id_does_not_exist_total, ?SUBSCRIPTION_ID_DOES_NOT_EXIST, counter, |
| 36 | + "Total number of commands failed with subscription id does not exist" |
| 37 | + }, |
| 38 | + { |
| 39 | + stream_error_stream_already_exists_total, ?STREAM_ALREADY_EXISTS, counter, |
| 40 | + "Total number of commands failed with stream already exists" |
| 41 | + }, |
| 42 | + { |
| 43 | + stream_error_stream_not_available_total, ?STREAM_NOT_AVAILABLE, counter, |
| 44 | + "Total number of commands failed with stream not available" |
| 45 | + }, |
| 46 | + { |
| 47 | + stream_error_sasl_mechanism_not_supported_total, ?SASL_MECHANISM_NOT_SUPPORTED, counter, |
| 48 | + "Total number of commands failed with sasl mechanism not supported" |
| 49 | + }, |
| 50 | + { |
| 51 | + stream_error_authentication_failure_total, ?AUTHENTICATION_FAILURE, counter, |
| 52 | + "Total number of commands failed with authentication failure" |
| 53 | + }, |
| 54 | + { |
| 55 | + stream_error_sasl_error_total, ?SASL_ERROR, counter, |
| 56 | + "Total number of commands failed with sasl error" |
| 57 | + }, |
| 58 | + { |
| 59 | + stream_error_sasl_challenge_total, ?SASL_CHALLENGE, counter, |
| 60 | + "Total number of commands failed with sasl challenge" |
| 61 | + }, |
| 62 | + { |
| 63 | + stream_error_sasl_authentication_failure_loopback_total, ?SASL_AUTHENTICATION_FAILURE_LOOPBACK, counter, |
| 64 | + "Total number of commands failed with sasl authentication failure loopback" |
| 65 | + }, |
| 66 | + { |
| 67 | + stream_error_vhost_access_failure_total, ?VHOST_ACCESS_FAILURE, counter, |
| 68 | + "Total number of commands failed with vhost access failure" |
| 69 | + }, |
| 70 | + { |
| 71 | + stream_error_unknown_frame_total, ?UNKNOWN_FRAME, counter, |
| 72 | + "Total number of commands failed with unknown frame" |
| 73 | + }, |
| 74 | + { |
| 75 | + stream_error_frame_too_large_total, ?FRAME_TOO_LARGE, counter, |
| 76 | + "Total number of commands failed with frame too large" |
| 77 | + }, |
| 78 | + { |
| 79 | + stream_error_internal_error_total, ?INTERNAL_ERROR, counter, |
| 80 | + "Total number of commands failed with internal error" |
| 81 | + }, |
| 82 | + { |
| 83 | + stream_error_access_refused_total, ?ACCESS_REFUSED, counter, |
| 84 | + "Total number of commands failed with access refused" |
| 85 | + }, |
| 86 | + { |
| 87 | + stream_error_precondition_failed_total, ?PRECONDITION_FAILED, counter, |
| 88 | + "Total number of commands failed with precondition failed" |
| 89 | + }, |
| 90 | + { |
| 91 | + stream_error_publisher_does_not_exist_total, ?PUBLISHER_DOES_NOT_EXIST, counter, |
| 92 | + "Total number of commands failed with publisher does not exist" |
| 93 | + } |
| 94 | + ]). |
0 commit comments