Zoomdata Version

Persisting Traces

By default, the Zoomdata tracing service does not persist (save) any tracing data, and will lose it all if the tracing service 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 Zoomdata tracing service supports persistence in Elasticsearch.

Persisting Traces in Elasticsearch

To use Elasticsearch to persist traces:

  1. Set up an Elasticsearch instance or cluster for the traces.

  2. Set the following properties in the etc/zoomdata/zoomdata-tracing-server.properties file to indicate that traces should be persisted using Elasticsearch:

    zipkin.storage.type=elasticsearch
    zipkin.storage.elasticsearch.hosts=<Elasticsearch-hostname>:<port>

    Replace <Elasticsearch-hostname> with the host name for Elasticsearch and <port> with the port number for the Elasticsearch instance.

  3. If your Elasticsearch cluster or instance uses authentication, also specify the following properties in the etc/zoomdata/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.

  4. Save the properties file.

  5. Start the service. For example, use the following command to start the Zoomdata Tracing Service using systemd in a CentOS or Ubuntu environment:

    sudo systemctl start zoomdata-tracing-server

    See Starting Zoomdata Services.

Configuring Persisted Trace Retention and Cleanup

Once configured to persist traces, the Zoomdata tracing service continues to write trace data to Elasticsearch without any regular cleanup. Zoomdata 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:

  1. Set the following properties in etc/zoomdata/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.

  2. Save the properties file and restart the tracing service. See Starting Zoomdata Services

Was this topic helpful?