Creates and starts a child span under this root span. If the root span is a real span (type = ROOT), the child span will be as well (type = CHILD). Otherwise, if the root span's type is UNTRACED or UNCORRELATED, the child span will be of the same type.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Interface PluginTypes.RootSpan (8.0.0)\n\nVersion latestkeyboard_arrow_down\n\n- [8.0.0 (latest)](/nodejs/docs/reference/trace-agent/latest/trace-agent/plugintypes.rootspan)\n- [7.1.2](/nodejs/docs/reference/trace-agent/7.1.2/trace-agent/plugintypes.rootspan)\n- [7.0.0](/nodejs/docs/reference/trace-agent/7.0.0/trace-agent/plugintypes.rootspan)\n- [5.1.6](/nodejs/docs/reference/trace-agent/5.1.6/trace-agent/plugintypes.rootspan) \nRepresents the root span within a trace. \n\nInheritance\n-----------\n\n[Span](/nodejs/docs/reference/trace-agent/latest/trace-agent/plugintypes.span) \\\u003e PluginTypes.RootSpan\n\nPackage\n-------\n\n[@google-cloud/trace-agent](../overview.html)\n\nMethods\n-------\n\n### createChildSpan(options)\n\n createChildSpan(options?: SpanOptions): Span;\n\nCreates and starts a child span under this root span. If the root span is a real span (type = ROOT), the child span will be as well (type = CHILD). Otherwise, if the root span's type is UNTRACED or UNCORRELATED, the child span will be of the same type."]]