Updated on 2024-02-28 GMT+08:00

Collecting Logs from SMN

LTS can collect logs from Simple Message Notification (SMN). For details, see Logs.

This function is available only in regions AF-Johannesburg, AP-Singapore, CN-Hong Kong, CN East-Shanghai1, LA-Mexico City1, LA-Mexico City2, LA-Santiago, and LA-Sao Paulo1.

Structuring Template Details

  • Log example
    Table 1 Structuring template example

    Template Name

    Example Log

    SMN

    {"message_id":"1ae49922602a42fc83acb9689a2eb5f4","project_id":"5a9f32e4f1ec4bbe9695ff9da51c2925","topic_urn":"urn:smn:cn-north-1:5a9f32e4f1ec4bbe9695ff9da51c2925:demo","subscriber_urn":"urn:smn:cn-north-1:5a9f32e4f1ec4bbe9695ff9da51c2925:demo:b55c3c6fa7cd471b9f24818d530a8740","protocol_name":"https","endpoint":"https://127.0.0.1:443/https","status":"DELIVERED","http_code":200,"create_time":"2022-11-01T00:00:00Z","send_time":"2022-11-01T00:00:10Z"}
  • Structuring fields and description
    Table 2 Structuring fields

    Field

    Example

    Description

    Type

    message_id

    1ae49922602a42fc83acb9689a2eb5f4

    Message ID.

    string

    project_id

    5a9f32e4f1ec4bbe9695ff9da51c2925

    Project ID.

    string

    topic_urn

    urn:smn:cn-north-1:5a9f32e4f1ec4bbe9695ff9da51c2925:demo

    Resource identifier of a topic, which is unique.

    string

    subscriber_urn

    urn:smn:cn-north-1:5a9f32e4f1ec4bbe9695ff9da51c2925:demo:b55c3c6fa7cd471b9f24818d530a8740

    Resource identifier of a subscription, which is unique.

    string

    protocol_name

    https

    Subscription protocol. (Different protocols indicate different types of endpoints to receive messages.) The following protocols are supported:

    email: The endpoints are email addresses.

    sms: The endpoints are phone numbers.

    functiongraph: FunctionGraph (function) transmission protocol. The endpoint is a function.

    functionstage: FunctionStage (workflow) transmission protocol. The endpoint is a function workflow.

    http and https: The endpoints are URLs.

    string

    endpoint

    https://127.0.0.1:443/https

    Message receiving endpoint.

    string

    status

    DELIVERED

    Message status. The options are as follows:

    DELIVERED: The message has been delivered.

    FAIL_DELIVERED: The message fails to be sent.

    REJECTS: The message has been rejected. The flow control mechanism is triggered.

    string

    http_code

    200

    HTTP return code. Only HTTP/HTTPS messages are supported.

    long

    create_time

    2022-11-01T00:00:00Z

    Time when a message is created. The UTC time is in YYYY-MM-DDTHH:MM:SSZ format.

    string

    send_time

    2022-11-01T00:00:10Z

    Time when a message is sent. The UTC time is in YYYY-MM-DDTHH:MM:SSZ format.

    string