- Documentation
Torch Log Service
SDK reference
Go SDK
Use TLS SDK for Go to query and analyze logs
Go SDK
Use TLS SDK for Go to query and analyze logs
Use TLS SDK for Go to query and analyze logs
Torch Log Service (TLS) allows you to use an SDK to query log data collected to the server. This topic offers sample code that demonstrates how to use TLS SDK for Go to query and analyze logs.
- Run the following command to install the proto dependency:
warning
We recommend that you use environment variables to dynamically get identity authentication information such as Volcano Engine AccessKey. Otherwise, hard-coded AccessKey information leads to data security risks.
You can use the SDK to call the SearchLogs API action to query and analyze log data. For information on the limits of the query and analysis feature, refer to [Query and analysis limits](/docs/tls/Limits#Query and analysis limits). For information on the syntax of query and analysis statements, refer to Log query syntax and Analysis overview. The following sample code returns all log data as an example to demonstrate how to use the SDK to query and analyze log data. - After you use the SDK to send an API request, the server returns a response. If the response contains a non-200 status code, the API call fails. To view the error code and error message, refer to API reference.
- The following table describes the API actions involved in the preceding sample code. To view the details of each API action, refer to API reference.
Last updated: 2025.10.11 16:44:07