- Documentation
Torch Log Service
SDK reference
Go SDK
Send logs to TOS using Go SDK
Go SDK
Send logs to TOS using Go SDK
Send logs to TOS using Go SDK
TLS supports delivering logs to TOS via SDK. This document uses example code to demonstrate how to deliver logs to TOS using the Go SDK.
- The TLS Go SDK has been installed. For more information, see Install Go SDK.
- The following commands have been executed to install the proto dependencies.
- The VOLCENGINE_ACCESS_KEY_ID and other environment variables have been added. For the method of configuring environment variables, please refer to Configure authentication information.
warning
It is recommended to dynamically obtain Volcengine keys and other authentication information through environment variables to avoid the data security risks caused by hardcoding AccessKey.
This document demonstrates, through example code, how to use the GO SDK to create a configuration for delivering logs to TOS in a specified Project. Please refer to Overview for related notes and fee information. - After you send an API request through the SDK, you will receive a response from the server. If the response contains a status code other than 200, it indicates that the API call has failed. You can refer to the documentation for each API to view the corresponding error code information.
- The API interfaces involved in this example are as follows. You can refer to the API documentation to view detailed information about the corresponding interface.
Last updated: 2025.10.11 16:44:08