- Documentation
Torch Log Service
SDK reference
Go SDK
Using the Go SDK to send logs to Kafka
Go SDK
Using the Go SDK to send logs to Kafka
Using the Go SDK to send logs to Kafka
TLS supports delivering logs to Kafka via the SDK. This document demonstrates, with example code, how to send logs to Kafka 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 information on how to configure environment variables, please refer to Configure authentication information.
warning
It is recommended to use environment variables to dynamically obtain Volcano Engine keys and other authentication information to avoid data security risks caused by hardcoding the AccessKey.
This document demonstrates, using sample code, how to use the GO SDK to create a configuration for delivering logs to Kafka in a specified Project. For related precautions and cost information, please refer to Overview. - 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 means 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