Skip to main content

rocketmq_protocol/trace/
trace_constants.rs

1// Copyright 2026 The RocketMQ Rust Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15pub struct TraceConstants;
16
17impl TraceConstants {
18    pub const GROUP_NAME_PREFIX: &'static str = "_INNER_TRACE_PRODUCER";
19    pub const CONTENT_SPLITOR: char = '\u{0001}';
20    pub const FIELD_SPLITOR: char = '\u{0002}';
21    pub const TRACE_INSTANCE_NAME: &'static str = "PID_CLIENT_INNER_TRACE_PRODUCER";
22    pub const TRACE_TOPIC_PREFIX: &'static str = "TRACE_DATA_";
23    pub const TO_PREFIX: &'static str = "To_";
24    pub const FROM_PREFIX: &'static str = "From_";
25    pub const END_TRANSACTION: &'static str = "EndTransaction";
26    pub const ROCKETMQ_SERVICE: &'static str = "rocketmq";
27    pub const ROCKETMQ_SUCCESS: &'static str = "rocketmq.success";
28    pub const ROCKETMQ_TAGS: &'static str = "rocketmq.tags";
29    pub const ROCKETMQ_KEYS: &'static str = "rocketmq.keys";
30    pub const ROCKETMQ_STORE_HOST: &'static str = "rocketmq.store_host";
31    pub const ROCKETMQ_BODY_LENGTH: &'static str = "rocketmq.body_length";
32    pub const ROCKETMQ_MSG_ID: &'static str = "rocketmq.mgs_id";
33    pub const ROCKETMQ_MSG_TYPE: &'static str = "rocketmq.mgs_type";
34    pub const ROCKETMQ_REGION_ID: &'static str = "rocketmq.region_id";
35    pub const ROCKETMQ_TRANSACTION_ID: &'static str = "rocketmq.transaction_id";
36    pub const ROCKETMQ_TRANSACTION_STATE: &'static str = "rocketmq.transaction_state";
37    pub const ROCKETMQ_IS_FROM_TRANSACTION_CHECK: &'static str = "rocketmq.is_from_transaction_check";
38    pub const ROCKETMQ_RETRY_TIMERS: &'static str = "rocketmq.retry_times";
39}