TLSExporter reports span data to the Volcengine TLS log service over OTLP (HTTP). Data is organized by TLS topic, which suits centralized storage, long-term retention, and cross-service trace analysis.
When to use
- You want your agent’s execution traces stored centrally in the Volcengine TLS log service;
- You need long-term retention and compliance/audit trails for trace data;
- You want to observe traces with TLS alerting and analysis capabilities.
Prerequisites
Complete installation and model configuration, then set the environment variables below before starting Python. Replace placeholders with accessible resources and valid credentialsUsage
Save asapp.py and run python app.py. The example uses existing resources and flushes pending traces after one model call
app.py
Parameters
Constructor parameters
TLSExporter carries its connection parameters in the config field of type TLSExporterConfig; when omitted, each field is read automatically from the corresponding environment variable.
TLS connection config
config is a TLSExporterConfig; each field defaults from TLSConfig and Volcengine credentials, with the following environment variables:
When
topic_id is not provided via OBSERVABILITY_OPENTELEMETRY_TLS_SERVICE_NAME, the exporter calls VeTLS to fetch the tracing topic ID automatically, so valid Volcengine credentials (VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY) are required.Agent attach the TLS exporter automatically from an environment variable, without constructing it explicitly:
Verification and troubleshooting
Search for the run’s Trace ID in the target backend. A successful model response does not prove trace delivery. If data is missing, check the endpoint and region, credential permissions, target resource, and whethertracer.force_export() ran before the process exited