mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
FSL-1.0-Apache-2.0 grants us the code, not the name. "Sentry" is Functional Software's trademark, so every place the running app says it to a user -- page titles, onboarding, empty states, toasts, settings copy, the self-hosted footer -- now says Sentinel. Attribution is the other half of the deal and stays untouched: upstream copyright headers, LICENSE, NOTICE. So does anything where the mark is a fact rather than a brand -- @sentry/* packages, sentry-cli, the wizard and bundler plugins, docs.sentry.io, the whole gettingStartedDocs tree. Renaming those would leave instructions that no longer work. Nothing structural moved. No import, identifier, route path, feature flag, API field or test id changed; the diff is 312 lines in and 312 out. Colocated specs were updated in lockstep with the copy they assert. Marketing and community links point at hanzo.ai, only where a real page exists to point at. Co-authored-by: Hanzo Dev <[email protected]>
129 lines
3.7 KiB
TypeScript
129 lines
3.7 KiB
TypeScript
import * as Sentry from '@sentry/react';
|
|
|
|
import {t} from 'sentry/locale';
|
|
import type {BuiltinSymbolSource} from 'sentry/types/debugFiles';
|
|
import type {ImageCandidate} from 'sentry/types/debugImage';
|
|
import {CandidateDownloadStatus, ImageFeature} from 'sentry/types/debugImage';
|
|
|
|
import {INTERNAL_SOURCE} from '../utils';
|
|
|
|
export function getImageFeatureDescription(type: ImageFeature) {
|
|
switch (type) {
|
|
case ImageFeature.HAS_DEBUG_INFO:
|
|
return {
|
|
label: t('debug'),
|
|
description: t(
|
|
'Debug information provides function names and resolves inlined frames during symbolication'
|
|
),
|
|
};
|
|
case ImageFeature.HAS_SOURCES:
|
|
return {
|
|
label: t('sources'),
|
|
description: t(
|
|
'Source code information allows Sentinel to display source code context for stack frames'
|
|
),
|
|
};
|
|
case ImageFeature.HAS_SYMBOLS:
|
|
return {
|
|
label: t('symtab'),
|
|
description: t(
|
|
'Symbol tables are used as a fallback when full debug information is not available'
|
|
),
|
|
};
|
|
case ImageFeature.HAS_UNWIND_INFO:
|
|
return {
|
|
label: t('unwind'),
|
|
description: t(
|
|
'Stack unwinding information improves the quality of stack traces extracted from minidumps'
|
|
),
|
|
};
|
|
default: {
|
|
Sentry.withScope(scope => {
|
|
scope.setLevel('warning');
|
|
Sentry.captureException(new Error('Unknown image candidate feature'));
|
|
});
|
|
return {}; // this shall not happen
|
|
}
|
|
}
|
|
}
|
|
|
|
export function getSourceTooltipDescription(
|
|
source: string,
|
|
builtinSymbolSources: Array<BuiltinSymbolSource> | null
|
|
) {
|
|
if (source === INTERNAL_SOURCE) {
|
|
return t(
|
|
"This debug information file is from Sentinel's internal symbol server for this project"
|
|
);
|
|
}
|
|
|
|
if (
|
|
builtinSymbolSources?.find(builtinSymbolSource => builtinSymbolSource.id === source)
|
|
) {
|
|
return t('This debug information file is from a built-in symbol server');
|
|
}
|
|
|
|
return t('This debug information file is from a custom symbol server');
|
|
}
|
|
|
|
export function getStatusTooltipDescription(
|
|
candidate: ImageCandidate,
|
|
hasReprocessWarning: boolean
|
|
) {
|
|
const {download, location, source} = candidate;
|
|
|
|
switch (download.status) {
|
|
case CandidateDownloadStatus.OK: {
|
|
return {
|
|
label: t('Download Details'),
|
|
description: location,
|
|
disabled: !location || source === INTERNAL_SOURCE,
|
|
};
|
|
}
|
|
|
|
case CandidateDownloadStatus.ERROR:
|
|
case CandidateDownloadStatus.MALFORMED: {
|
|
const {details} = download;
|
|
return {
|
|
label: t('Download Details'),
|
|
description: details,
|
|
disabled: !details,
|
|
};
|
|
}
|
|
case CandidateDownloadStatus.NOT_FOUND: {
|
|
return {};
|
|
}
|
|
case CandidateDownloadStatus.NO_PERMISSION: {
|
|
const {details} = download;
|
|
return {
|
|
label: t('Permission Error'),
|
|
description: details,
|
|
disabled: !details,
|
|
};
|
|
}
|
|
case CandidateDownloadStatus.DELETED: {
|
|
return {
|
|
label: t('This file was deleted after the issue was processed.'),
|
|
};
|
|
}
|
|
case CandidateDownloadStatus.UNAPPLIED: {
|
|
return {
|
|
label: hasReprocessWarning
|
|
? t(
|
|
'This issue was processed before this debug information file was available. To apply new debug information, reprocess this issue.'
|
|
)
|
|
: t(
|
|
'This issue was processed before this debug information file was available'
|
|
),
|
|
};
|
|
}
|
|
default: {
|
|
Sentry.withScope(scope => {
|
|
scope.setLevel('warning');
|
|
Sentry.captureException(new Error('Unknown image candidate download status'));
|
|
});
|
|
return {}; // This shall not happen
|
|
}
|
|
}
|
|
}
|