Extending trace expiry time for logs

You can extend the expiry time of traces for logs, by using the modifyTraces API.

If you want to create a trace with expiry time longer than the default 10 minutes, use the modifyTraces API. In the API, provide an input value in minutes for the TraceTTL attribute. However, by default the maximum TTL value is 1440 minutes, which is 1 day. To extent this value, use the yfs.trace.max.ttl JVM argument. For example, to set the maximum TTL to 2 days, set Dyfs.trace.max.ttl = 2880.

Additionally, you can change the default TTL of 10 minutes. This ensures the traces that are created from UI have a longer duration than 10 minutes that is configured either out of the box or by invoking modifyTraces API without passing TraceTTL attribute in the API input. To define a TTL beyond the default TTL that is of 10 minutes, use the yfs.trace.default.ttl JVM argument. For example, to change the default TTL value to 1 hour, set Dyfs.trace.default.ttl = 60.

Note: TTL can be defined only when the traces are configured by calling the modifyTraces API. If the traces are configured by using any other method, the default value of TTL that is 10 minutes, is considered. The TTL or default TTL values must not exceed maximum TTL.

For more information about the modifyTraces API, see Javadoc.