Fixed NPE issues when parentSpanId is missing