Name for the span object.
Optional: Arguments for the function (see below)
Optionalattributes?: AttrMapAttributes payload to attach to the trace span.
Optionalcarrier?: CarrierMapThis is a OTel carrier that can be recieved via message or HTTP headers from another process or source. If unsure don't include this argument. This is the parent when the parent is "remote" (i.e. client/server or across processes).
OptionalparentObject?: ASpanThis is used as the parent for the new trace span like a carrier but in-process.
The ASpan object if successful, or undefined if not initialized.
Create the parent or child tracing span object (ASpan) used to send trace events. The object
end()must be called before the trace span can be sent to the collector.