smpp-connector — Observability
Status: populated | Last updated: 2026-04-18
1. Metrics (Prometheus)
All metrics exposed at GET /metrics on port 3001.
| Metric name | Type | Labels | Description |
|---|---|---|---|
smpp_connector_sessions_total | Gauge | operator_id, state | Current sessions by state (BOUND/UNBOUND/CONNECTING) |
smpp_connector_submit_sm_total | Counter | operator_id, status (success, error, throttled) | submit_sm PDUs sent |
smpp_connector_submit_sm_duration_seconds | Histogram | operator_id | Time from submit_sm send to submit_sm_resp |
smpp_connector_dlr_received_total | Counter | operator_id, status | deliver_sm PDUs received by DLR status |
smpp_connector_dlr_correlation_not_found_total | Counter | operator_id | DLRs received with no matching correlation record |
smpp_connector_tps_throttle_total | Counter | operator_id | Number of messages throttled by TPS limiter |
smpp_connector_tps_current | Gauge | operator_id | Current TPS rate (last 1 s window) |
smpp_connector_reconnect_attempts_total | Counter | operator_id | Total reconnection attempts |
smpp_connector_enquire_link_timeout_total | Counter | operator_id | enquire_link timeouts (precede UNBOUND transitions) |
smpp_connector_pdu_bytes_sent_total | Counter | operator_id | Total bytes sent over SMPP socket |
smpp_connector_pdu_bytes_received_total | Counter | operator_id | Total bytes received over SMPP socket |
smpp_connector_long_message_segments_total | Counter | operator_id, strategy (csms, tlv) | Segmented PDUs sent |
Key Alerts
| Alert | Condition | Severity |
|---|---|---|
SmppConnectorSessionUnbound | sessions_total{state="BOUND"} == 0 for any operator for 60 s | critical |
SmppConnectorHighThrottleRate | rate(tps_throttle_total[1m]) > 10 per operator | warning |
SmppConnectorHighDlrCorrelationMiss | rate(dlr_correlation_not_found_total[5m]) > 1 | warning |
SmppConnectorEnquireLinkFailure | enquire_link_timeout_total increasing for 2 min | warning |
SmppConnectorAllSessionsDown | All operator sessions UNBOUND simultaneously | critical |
2. Structured Logging
All logs emitted as JSON to stdout.
Standard log fields
| Field | Type | Description |
|---|---|---|
timestamp | ISO 8601 | Event time |
level | string | debug / info / warn / error |
service | string | Always smpp-connector |
operatorId | string | Operator context for the log event |
traceId | string | OpenTelemetry trace ID (propagated from NATS message headers) |
message | string | Human-readable summary |
Key log events
Event (message) | Level | Extra fields |
|---|---|---|
smpp.session.connecting | info | operatorId, host, port |
smpp.session.bound | info | operatorId, bindMode, reconnectAttempts |
smpp.session.unbound | warn | operatorId, reason |
smpp.session.failback | info | operatorId |
smpp.submit_sm.sent | debug | operatorId, sequenceNumber (no to, no text) |
smpp.submit_sm.resp | debug | operatorId, sequenceNumber, operatorMessageId, commandStatus |
smpp.submit_sm.throttled | warn | operatorId, tpsCurrent, tpsLimit |
smpp.dlr.received | info | operatorId, operatorMessageId, messageState |
smpp.dlr.correlation.not_found | warn | operatorId, operatorMessageId |
smpp.enquire_link.timeout | warn | operatorId |
smpp.reconnect.scheduled | info | operatorId, attempt, delayMs |
PII policy: to (destination number) and text (message content) are never logged.
3. Distributed Tracing (OpenTelemetry)
- Trace context propagated from NATS message headers (
traceparentheader per W3C Trace Context). - Spans created:
smpp-connector.dispatch(per NATS message consumed)smpp-connector.tps_check(Redis TPS window check)smpp-connector.submit_sm(PDU send + response wait)smpp-connector.db.insert_correlationsmpp-connector.dlr.processsmpp-connector.dlr.publish