Persist Traces
By default, the Composer tracing microservice does not persist (save) any tracing data, and will lose it all if the tracing microservice is restarted. Traces are also only held in memory until the memory is needed for something else. This is not ideal in a production environment. The Composer tracing microservice supports persistence in Elasticsearch.
Persist Traces in Elasticsearch
To use Elasticsearch to persist traces:
Set up an Elasticsearch instance or cluster for the traces. Only Elasticsearch version 5 and 6 are supported.
Set the following properties in the
etc/zoomdata/tracing-server.properties
file to indicate that traces should be persisted using Elasticsearch:zipkin.storage.type=elasticsearch
zipkin.storage.elasticsearch.hosts=http://<Elasticsearch-hostname>:<port>Replace
<Elasticsearch-hostname>
with the host name for Elasticsearch and<port>
with the port number for the Elasticsearch instance.If your Elasticsearch cluster or instance uses authentication, also specify the following properties in the
etc/zoomdata/tracing-server.properties
file:zipkin.storage.username=<Elasticsearch-username>
zipkin.storage.elasticsearch.password=<Elasticsearch-password>Replace
<Elasticsearch-username>
with the user name for Elasticsearch and<Elasticsearch-password>
with the password associated with the Elasticsearch user name.Save the properties file.
Restart the microservice. For example, use the following command to restart the Composer tracing microservice using
systemd
in a CentOS 7 or 8 or Ubuntu 16 or 18 environment:sudo systemctl restart zoomdata-tracing-server
See Manage Composer v6 Microservices Using the Command Line Utility.
Configure Persisted Trace Retention and Cleanup
After it is configured to persist traces, the Composer tracing microservice continues to write trace data to Elasticsearch without any regular cleanup. Composer recommends that you establish a regular schedule for cleanup of this data since it can become voluminous in a short time frame.
To configure persisted trace retention and cleanup:
Set the following properties in
etc/zoomdata/tracing-server.properties
:storage.retention.removal.enabled=true
storage.retention.cleanup.minutes=<cleanup_interval>
storage.retention.days=<retention_interval>Replace
<cleanup_interval>
with the number of minutes between scans for expired trace data in storage. Replace<retention_interval>
with the number of days to retain each index. By default, index names include the date:zipkin:span-yyyy-MM-dd
.Save the properties file and restart the tracing microservice. See Manage Composer v6 Microservices Using the Command Line Utility.
Comments
0 comments
Please sign in to leave a comment.