utils.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import {t} from 'sentry/locale';
  2. import {DebugFile, DebugFileFeature, DebugFileType} from 'sentry/types/debugFiles';
  3. export function getFileType(dsym: DebugFile) {
  4. switch (dsym.data?.type) {
  5. case DebugFileType.EXE:
  6. return t('executable');
  7. case DebugFileType.DBG:
  8. return t('debug companion');
  9. case DebugFileType.LIB:
  10. return t('dynamic library');
  11. default:
  12. return null;
  13. }
  14. }
  15. export function getFeatureTooltip(feature: DebugFileFeature) {
  16. switch (feature) {
  17. case DebugFileFeature.SYMTAB:
  18. return t(
  19. 'Symbol tables are used as a fallback when full debug information is not available'
  20. );
  21. case DebugFileFeature.DEBUG:
  22. return t(
  23. 'Debug information provides function names and resolves inlined frames during symbolication'
  24. );
  25. case DebugFileFeature.UNWIND:
  26. return t(
  27. 'Stack unwinding information improves the quality of stack traces extracted from minidumps'
  28. );
  29. case DebugFileFeature.SOURCES:
  30. return t(
  31. 'Source code information allows Sentry to display source code context for stack frames'
  32. );
  33. default:
  34. return null;
  35. }
  36. }