initial port of trace v2.6.0