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
//! Label constants for consistent metric labeling
//!
//! These constants ensure consistent label names and values across all metrics.
/// Label: entity name (table/view being queried)
pub const ENTITY: &str = "entity";
/// Label: error category (connection, protocol, `json_decode`, etc.)
pub const ERROR_CATEGORY: &str = "error_category";
/// Label: type name for deserialization metrics
pub const TYPE_NAME: &str = "type_name";
/// Label: transport type (tcp, unix)
pub const TRANSPORT: &str = "transport";
/// Label: authentication mechanism (cleartext, scram)
pub const MECHANISM: &str = "mechanism";
/// Label: result status (ok, error, filtered, etc.)
pub const STATUS: &str = "status";
/// Label: reason for failure or state
pub const REASON: &str = "reason";
/// Label: phase of execution (auth, startup, query, streaming)
pub const PHASE: &str = "phase";
/// Status value: ok
pub const STATUS_OK: &str = "ok";
/// Status value: error
pub const STATUS_ERROR: &str = "error";
/// Status value: filtered
pub const STATUS_FILTERED: &str = "filtered";
/// Status value: cancelled
pub const STATUS_CANCELLED: &str = "cancelled";
/// Transport value: TCP socket
pub const TRANSPORT_TCP: &str = "tcp";
/// Transport value: Unix domain socket
pub const TRANSPORT_UNIX: &str = "unix";
/// Mechanism value: cleartext password
pub const MECHANISM_CLEARTEXT: &str = "cleartext";
/// Mechanism value: SCRAM-SHA-256
pub const MECHANISM_SCRAM: &str = "scram";
/// Phase value: authentication
pub const PHASE_AUTH: &str = "auth";
/// Phase value: startup
pub const PHASE_STARTUP: &str = "startup";
/// Phase value: query execution
pub const PHASE_QUERY: &str = "query";
/// Phase value: streaming results
pub const PHASE_STREAMING: &str = "streaming";
/// Phase value: transport connection
pub const PHASE_TRANSPORT: &str = "transport";