File: rabbit_stream_metrics.hrl

package info (click to toggle)
rabbitmq-server 4.0.5-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,972 kB
  • sloc: erlang: 257,835; javascript: 22,466; sh: 3,037; makefile: 2,517; python: 1,966; xml: 646; cs: 335; java: 244; ruby: 212; php: 100; perl: 63; awk: 13
file content (110 lines) | stat: -rw-r--r-- 5,043 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
%% The contents of this file are subject to the Mozilla Public License
%% Version 2.0 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at https://www.mozilla.org/en-US/MPL/2.0/
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and
%% limitations under the License.
%%
%% The Original Code is RabbitMQ.
%%
%% The Initial Developer of the Original Code is Pivotal Software, Inc.
%% Copyright (c) 2007-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
%%

-include_lib("rabbit/include/rabbit_global_counters.hrl").

-define(TABLE_CONSUMER, rabbit_stream_consumer_created).
-define(TABLE_PUBLISHER, rabbit_stream_publisher_created).

-define(STREAM_DOES_NOT_EXIST, ?NUM_PROTOCOL_COUNTERS + 1).
-define(SUBSCRIPTION_ID_ALREADY_EXISTS, ?NUM_PROTOCOL_COUNTERS + 2).
-define(SUBSCRIPTION_ID_DOES_NOT_EXIST, ?NUM_PROTOCOL_COUNTERS + 3).
-define(STREAM_ALREADY_EXISTS, ?NUM_PROTOCOL_COUNTERS + 4).
-define(STREAM_NOT_AVAILABLE, ?NUM_PROTOCOL_COUNTERS + 5).
-define(SASL_MECHANISM_NOT_SUPPORTED, ?NUM_PROTOCOL_COUNTERS + 6).
-define(AUTHENTICATION_FAILURE, ?NUM_PROTOCOL_COUNTERS + 7).
-define(SASL_ERROR, ?NUM_PROTOCOL_COUNTERS + 8).
-define(SASL_CHALLENGE, ?NUM_PROTOCOL_COUNTERS + 9).
-define(SASL_AUTHENTICATION_FAILURE_LOOPBACK, ?NUM_PROTOCOL_COUNTERS + 10).
-define(VHOST_ACCESS_FAILURE, ?NUM_PROTOCOL_COUNTERS + 11).
-define(UNKNOWN_FRAME, ?NUM_PROTOCOL_COUNTERS + 12).
-define(FRAME_TOO_LARGE, ?NUM_PROTOCOL_COUNTERS + 13).
-define(INTERNAL_ERROR, ?NUM_PROTOCOL_COUNTERS + 14).
-define(ACCESS_REFUSED, ?NUM_PROTOCOL_COUNTERS + 15).
-define(PRECONDITION_FAILED, ?NUM_PROTOCOL_COUNTERS + 16).
-define(PUBLISHER_DOES_NOT_EXIST, ?NUM_PROTOCOL_COUNTERS + 17).

-define(PROTOCOL_COUNTERS,
        [
         {
          stream_error_stream_does_not_exist_total, ?STREAM_DOES_NOT_EXIST, counter,
          "Total number of commands rejected with stream does not exist error"
         },
         {
          stream_error_subscription_id_already_exists_total, ?SUBSCRIPTION_ID_ALREADY_EXISTS, counter,
          "Total number of commands failed with subscription id already exists"
         },
         {
          stream_error_subscription_id_does_not_exist_total, ?SUBSCRIPTION_ID_DOES_NOT_EXIST, counter,
          "Total number of commands failed with subscription id does not exist"
         },
         {
          stream_error_stream_already_exists_total, ?STREAM_ALREADY_EXISTS, counter,
          "Total number of commands failed with stream already exists"
         },
         {
          stream_error_stream_not_available_total, ?STREAM_NOT_AVAILABLE, counter,
          "Total number of commands failed with stream not available"
         },
         {
          stream_error_sasl_mechanism_not_supported_total, ?SASL_MECHANISM_NOT_SUPPORTED, counter,
          "Total number of commands failed with sasl mechanism not supported"
         },
         {
          stream_error_authentication_failure_total, ?AUTHENTICATION_FAILURE, counter,
          "Total number of commands failed with authentication failure"
         },
         {
          stream_error_sasl_error_total, ?SASL_ERROR, counter,
          "Total number of commands failed with sasl error"
         },
         {
          stream_error_sasl_challenge_total, ?SASL_CHALLENGE, counter,
          "Total number of commands failed with sasl challenge"
         },
         {
          stream_error_sasl_authentication_failure_loopback_total, ?SASL_AUTHENTICATION_FAILURE_LOOPBACK, counter,
          "Total number of commands failed with sasl authentication failure loopback"
         },
         {
          stream_error_vhost_access_failure_total, ?VHOST_ACCESS_FAILURE, counter,
          "Total number of commands failed with vhost access failure"
         },
         {
          stream_error_unknown_frame_total, ?UNKNOWN_FRAME, counter,
          "Total number of commands failed with unknown frame"
         },
         {
          stream_error_frame_too_large_total, ?FRAME_TOO_LARGE, counter,
          "Total number of commands failed with frame too large"
         },
         {
          stream_error_internal_error_total, ?INTERNAL_ERROR, counter,
          "Total number of commands failed with internal error"
         },
         {
          stream_error_access_refused_total, ?ACCESS_REFUSED, counter,
          "Total number of commands failed with access refused"
         },
         {
          stream_error_precondition_failed_total, ?PRECONDITION_FAILED, counter,
          "Total number of commands failed with precondition failed"
         },
         {
          stream_error_publisher_does_not_exist_total, ?PUBLISHER_DOES_NOT_EXIST, counter,
          "Total number of commands failed with publisher does not exist"
         }
        ]).