getRootSpan.js 591 B

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