Persisting Traces

By default, the Zoomdata 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 Zoomdata tracing microservice 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/ file to indicate that traces should be persisted using Elasticsearch:<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/ file:<Elasticsearch-username><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 microservice. For example, use the following command to start the Zoomdata tracing microservice using systemd in a CentOS or Ubuntu environment:

    sudo systemctl start zoomdata-tracing-server

    See Starting Zoomdata Microservices.

Configuring Persisted Trace Retention and Cleanup

After it is configured to persist traces, the Zoomdata tracing microservice 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/


    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 microservice. See Starting Zoomdata Microservices