pub struct Signal {
pub received_at: DateTime<Utc>,
pub app_id: String,
pub client_user: String,
pub session_id: String,
pub signal_type: String,
pub payload: Vec<String>,
pub is_test_mode: String,
pub float_value: Option<f64>,
}Expand description
An instance of an outgoing telemetry signal
This struct represents a single telemetry event that will be sent to TelemetryDeck.
Signals are automatically created by TelemetryDeck::send and TelemetryDeck::send_sync
methods - you typically don’t need to construct these manually.
§Serialization
This struct serializes to JSON in camelCase format as expected by the TelemetryDeck API:
{
"receivedAt": "2025-01-15T10:30:00Z",
"appID": "xxx-xxx-xxx",
"clientUser": "hashed-user-id",
"sessionID": "session-uuid",
"type": "signalType",
"payload": ["key1:value1", "key2:value2"],
"isTestMode": "false",
"floatValue": 42.5
}§Privacy
client_useris always SHA-256 hashed before being setsession_idis a UUID v4 generated per client instanceis_test_modeis serialized as a string (“true” or “false”)float_valueis omitted from JSON whenNone
Fields§
§received_at: DateTime<Utc>Timestamp when this signal was generated (UTC)
app_id: StringThe TelemetryDeck App ID this signal belongs to
client_user: StringSHA-256 hashed user identifier
This value is automatically hashed by the client before transmission. The server will hash it again with its own salt for privacy.
session_id: StringSession identifier (UUID v4)
Persists for the lifetime of a TelemetryDeck instance.
Can be reset using TelemetryDeck::reset_session.
signal_type: StringThe type/name of this signal (e.g., “userLogin”, “buttonClick”)
payload: Vec<String>Custom parameters encoded as “key:value” strings
Created from the HashMap passed to send() or send_sync().
Keys containing colons are sanitized (: → _).
is_test_mode: StringWhether this is a test signal (serialized as string “true” or “false”)
Test signals are shown separately in the TelemetryDeck UI.
float_value: Option<f64>Optional floating-point value associated with this signal
Useful for tracking numeric metrics like revenue, duration, score, etc.
Omitted from JSON when None.