Function formatTraceId