|
4 | 4 | # conditions defined in the file COPYING, which is part of this source code package. |
5 | 5 | """Minimal crash-reporting library: dataclasses, on-disk store, and fingerprint helpers. |
6 | 6 |
|
7 | | -Code is migrated here from ``cmk.ccc.crash_reporting`` later. Write-time |
8 | | -deduplication behavior is preserved. the fingerprint helpers and the |
9 | | -``CrashReportStore.save()`` merge-into-existing logic land in this library |
10 | | -alongside the store. |
| 7 | +Ported verbatim from ``cmk.ccc.crash_reporting``. Write-time deduplication |
| 8 | +behavior is preserved: the fingerprint helpers and the |
| 9 | +``CrashReportStore.save()`` merge-into-existing logic live in this library |
| 10 | +alongside the store. The public API surface is unchanged from the old module — |
| 11 | +only the import path moves (``cmk.ccc.crash_reporting`` → ``cmk.crash``). |
11 | 12 | """ |
| 13 | + |
| 14 | +from cmk.ccc.version_info import VersionInfo |
| 15 | + |
| 16 | +from ._crash import ( |
| 17 | + ABCCrashReport, |
| 18 | + BaseDetails, |
| 19 | + ContactDetails, |
| 20 | + CRASH_INFO_VERSION, |
| 21 | + CrashInfo, |
| 22 | + CrashOccurrences, |
| 23 | + format_var_for_export, |
| 24 | + make_crash_report_base_path, |
| 25 | + REDACTED_STRING, |
| 26 | + RobustJSONEncoder, |
| 27 | + SENSITIVE_KEYWORDS, |
| 28 | + SerializedCrashReport, |
| 29 | + TDetails, |
| 30 | +) |
| 31 | +from ._fingerprint import ( |
| 32 | + crash_fingerprint, |
| 33 | + fingerprint_hash, |
| 34 | + normalize_crash_time, |
| 35 | +) |
| 36 | +from ._store import ( |
| 37 | + cleanup_crash_reports, |
| 38 | + CrashReportStore, |
| 39 | + DEFAULT_MAX_CRASH_AGE, |
| 40 | + DEFAULT_MAX_CRASHES_TOTAL_SIZE, |
| 41 | +) |
| 42 | + |
| 43 | +__all__ = [ |
| 44 | + "ABCCrashReport", |
| 45 | + "BaseDetails", |
| 46 | + "cleanup_crash_reports", |
| 47 | + "ContactDetails", |
| 48 | + "CRASH_INFO_VERSION", |
| 49 | + "CrashInfo", |
| 50 | + "CrashOccurrences", |
| 51 | + "CrashReportStore", |
| 52 | + "DEFAULT_MAX_CRASH_AGE", |
| 53 | + "DEFAULT_MAX_CRASHES_TOTAL_SIZE", |
| 54 | + "REDACTED_STRING", |
| 55 | + "RobustJSONEncoder", |
| 56 | + "SENSITIVE_KEYWORDS", |
| 57 | + "SerializedCrashReport", |
| 58 | + "TDetails", |
| 59 | + "VersionInfo", |
| 60 | + "crash_fingerprint", |
| 61 | + "fingerprint_hash", |
| 62 | + "format_var_for_export", |
| 63 | + "make_crash_report_base_path", |
| 64 | + "normalize_crash_time", |
| 65 | +] |
0 commit comments