extras/crash_test.conf
author Vincent Tondellier <tonton+hg@team1664.org>
Mon, 17 Jul 2023 22:51:43 +0200
changeset 133 42a4a2f8c790
parent 120 1a0fa98037fa
permissions -rw-r--r--
Cleanup Fix confusion between defined and exists

{
  Processor => {
    JobQueue => {
      Backend => {
        Minion => { Pg => "postgresql:///crashtest" },
      },
    },
    CrashProcessor => {
      Breakpad => {
        JSONStackwalker => 'stackwalker',
        SymbolsPath => 'data/breakpad-symbols/*',
      },
    },
    CrashSignatureExtractor => {
      C_Cpp => {
        GroupMaxDistance => 0.1,
        TopIrrelevant => [
          # Ignore these frames at the top of the stack when creating a crash signature (mostly exception handler and libc internal functions)
          "__cxxabiv1::__terminate",
          "__gnu_cxx::__verbose_terminate_handler",
          "std::terminate",
          "raise",
          "abort",
        ],
        TopFrame => [
          # Consider these frames as the first (from top) relevant frame of the crash
          # Order is important here, the first match will be selected
          qr/std::__throw_[a-z]+_error/,
          "__cxxabiv1::__cxa_throw",
        ],
        BottomIrrelevant => [
          # Ignore these frames at the bottom of the stack (libc internal functions)
          "__libc_start_main",
          "_init",
        ],
        BottomFrame => [
          # Don't use frames past this one in the signature
          #"main",
        ],
        RemoveNamespace => [
          # Clean function names by removing the namespace
          #"some_ns::",
        ],
      },
    },
  },
  Storage => [
    { Type => "Sql",  db => { Pg => "postgresql:///crashtest" } },
    { Type => "File", DataDir => 'data/crashs/' },
  ],
  WebInterface => {
    ScmLinks => {
      "svn:svn.example.org/testproject" => 'https://redmine.example.org/projects/testproject/repository/entry/<%= $scmpath =%>?rev=<%= $rev =%>#L<%= $line =%>',
    },
    BugTrackerLinks => {
      MyRedmine => {
        Type => 'Redmine',
        API => { URL => 'https://redmine.example.org/' },
        url_pattern => 'http://redmine.example.org/issues/<%= $bug_key =%>',
      },
      MyBugzilla => {
        Type => 'Bugzilla',
        API => { URL => 'https://bugzilla.example.org/' },
        url_pattern => 'https://bugzilla.example.org/show_bug.cgi?id=<%= $bug_key =%>',
      },
    },
    ExtraColumns => {
      Index => [
        { id => 'os'        , db_column => "crash_user.os", name => 'Operating System' },
        { id => 'cpu_count' , db_column => "crash_user.cpu_count", name => "CPU count" },
        { id => 'program'   , db_column => "main_module", name => 'Program' },
      ],
      GroupIndex => [
        { id => 'program'   , db_column => "string_agg(distinct(main_module), ', ')", name => 'Programs' },
      ],
      Search => [
        { id => 'cpu_count' , db_column => "crash_user.cpu_count", name => "CPU count" },
        { id => 'program'   , db_column => "main_module", name => 'Program' },
      ],
    },
  },
};
# vim:ft=perl: