getRootSpan.js 516 B

12345678910111213141516
  1. /**
  2. * Returns the root span of a given span.
  3. *
  4. * As long as we use `Transaction`s internally, the returned root span
  5. * will be a `Transaction` but be aware that this might change in the future.
  6. *
  7. * If the given span has no root span or transaction, `undefined` is returned.
  8. */
  9. function getRootSpan(span) {
  10. // TODO (v8): Remove this check and just return span
  11. // eslint-disable-next-line deprecation/deprecation
  12. return span.transaction;
  13. }
  14. export { getRootSpan };
  15. //# sourceMappingURL=getRootSpan.js.map