Skip to main content

smpp-connector — Observability

Status: populated | Last updated: 2026-04-18

1. Metrics (Prometheus)

All metrics exposed at GET /metrics on port 3001.

Metric nameTypeLabelsDescription
smpp_connector_sessions_totalGaugeoperator_id, stateCurrent sessions by state (BOUND/UNBOUND/CONNECTING)
smpp_connector_submit_sm_totalCounteroperator_id, status (success, error, throttled)submit_sm PDUs sent
smpp_connector_submit_sm_duration_secondsHistogramoperator_idTime from submit_sm send to submit_sm_resp
smpp_connector_dlr_received_totalCounteroperator_id, statusdeliver_sm PDUs received by DLR status
smpp_connector_dlr_correlation_not_found_totalCounteroperator_idDLRs received with no matching correlation record
smpp_connector_tps_throttle_totalCounteroperator_idNumber of messages throttled by TPS limiter
smpp_connector_tps_currentGaugeoperator_idCurrent TPS rate (last 1 s window)
smpp_connector_reconnect_attempts_totalCounteroperator_idTotal reconnection attempts
smpp_connector_enquire_link_timeout_totalCounteroperator_idenquire_link timeouts (precede UNBOUND transitions)
smpp_connector_pdu_bytes_sent_totalCounteroperator_idTotal bytes sent over SMPP socket
smpp_connector_pdu_bytes_received_totalCounteroperator_idTotal bytes received over SMPP socket
smpp_connector_long_message_segments_totalCounteroperator_id, strategy (csms, tlv)Segmented PDUs sent

Key Alerts

AlertConditionSeverity
SmppConnectorSessionUnboundsessions_total{state="BOUND"} == 0 for any operator for 60 scritical
SmppConnectorHighThrottleRaterate(tps_throttle_total[1m]) > 10 per operatorwarning
SmppConnectorHighDlrCorrelationMissrate(dlr_correlation_not_found_total[5m]) > 1warning
SmppConnectorEnquireLinkFailureenquire_link_timeout_total increasing for 2 minwarning
SmppConnectorAllSessionsDownAll operator sessions UNBOUND simultaneouslycritical

2. Structured Logging

All logs emitted as JSON to stdout.

Standard log fields

FieldTypeDescription
timestampISO 8601Event time
levelstringdebug / info / warn / error
servicestringAlways smpp-connector
operatorIdstringOperator context for the log event
traceIdstringOpenTelemetry trace ID (propagated from NATS message headers)
messagestringHuman-readable summary

Key log events

Event (message)LevelExtra fields
smpp.session.connectinginfooperatorId, host, port
smpp.session.boundinfooperatorId, bindMode, reconnectAttempts
smpp.session.unboundwarnoperatorId, reason
smpp.session.failbackinfooperatorId
smpp.submit_sm.sentdebugoperatorId, sequenceNumber (no to, no text)
smpp.submit_sm.respdebugoperatorId, sequenceNumber, operatorMessageId, commandStatus
smpp.submit_sm.throttledwarnoperatorId, tpsCurrent, tpsLimit
smpp.dlr.receivedinfooperatorId, operatorMessageId, messageState
smpp.dlr.correlation.not_foundwarnoperatorId, operatorMessageId
smpp.enquire_link.timeoutwarnoperatorId
smpp.reconnect.scheduledinfooperatorId, 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 (traceparent header 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_correlation
    • smpp-connector.dlr.process
    • smpp-connector.dlr.publish