feature:TSG-7213增加feature选项,可以选择生成minidump或传统的coredump文件

This commit is contained in:
fumingwei
2021-07-28 10:36:59 +08:00
parent f3b508fdd6
commit 8dd23dfda9
6 changed files with 73 additions and 13 deletions

View File

@@ -4,12 +4,31 @@ DEBUG_SWITCH = 1
RUN_LOG_PATH = "conf/zlog.conf"
[breakpad]
disable_coredump=0
enable_breakpad=1
breakpad_minidump_dir=/tmp/certstore/crashreport
enable_breakpad_upload=1
{% raw %}breakpad_upload_url= {{ sentry_url }}
{% endraw %}
{% raw %}{% if coredump.format == 'none' %}
disable_coredump=1
enable_breakpad=0
enable_breakpad_upload=0
{% endif %}
{% if coredump.format == 'core' %}
disable_coredump=0
enable_breakpad=0
enable_breakpad_upload=0
{% endif %}
{% if coredump.format == 'minidump' %}
disable_coredump=1
enable_breakpad=1
{% if coredump.collect == 'sentry' %}
enable_breakpad_upload=1
breakpad_upload_url={{ coredump.sentry_url }}
{% endif %}
{% if coredump.collect == 'local' %}
enable_breakpad_upload=0
{% endif %}
{% endif %}
{% endraw %}
breakpad_minidump_dir="/tmp/crashreport"
[CONFIG]
#Number of running threads
thread-nu = 4

View File

@@ -192,12 +192,29 @@ dictator_enable=1
[breakpad]
{% raw %}{% if coredump.format == 'none' %}
disable_coredump=1
enable_breakpad=0
enable_breakpad_upload=0
{% endif %}
{% if coredump.format == 'core' %}
disable_coredump=0
enable_breakpad=0
enable_breakpad_upload=0
{% endif %}
{% if coredump.format == 'minidump' %}
disable_coredump=1
enable_breakpad=1
breakpad_minidump_dir="/tmp/crashreport"
{% if coredump.collect == 'sentry' %}
enable_breakpad_upload=1
{% raw %} breakpad_upload_url="{{ sentry_url }}"
breakpad_upload_url={{ coredump.sentry_url }}
{% endif %}
{% if coredump.collect == 'local' %}
enable_breakpad_upload=0
{% endif %}
{% endif %}
{% endraw %}
breakpad_minidump_dir="/tmp/crashreport"
### note:
### These configurations format is complex and difficult to describe with toml grammar,

View File

@@ -5,10 +5,28 @@ enable_kni_v2=0
enable_kni_v3=1
# Only when (disable_coredump == 1 || (enable_breakpad == 1 && enable_breakpad_upload == 1)) is satisfied, the core will not be generated locally
{% raw %}{% if coredump.format == 'none' %}
disable_coredump=1
enable_breakpad=0
enable_breakpad_upload=0
{% endif %}
{% if coredump.format == 'core' %}
disable_coredump=0
enable_breakpad=0
enable_breakpad_upload=0
{% endif %}
{% if coredump.format == 'minidump' %}
disable_coredump=1
enable_breakpad=1
{% if coredump.collect == 'sentry' %}
enable_breakpad_upload=1
{% raw %}breakpad_upload_url={{ sentry_url }}
breakpad_upload_url={{ coredump.sentry_url }}
{% endif %}
{% if coredump.collect == 'local' %}
enable_breakpad_upload=0
{% endif %}
{% endif %}
{% endraw %}
# must be /run/tfe/crashreportdue to tmpfile limit
breakpad_minidump_dir=/run/tfe/crashreport

View File

@@ -8,8 +8,10 @@ cm:
db_static: 0
db_dynamic: 1
sentry_url: http://127.0.0.1:9000/api/2/minidump/?sentry_key=3203b43fd5384a7dbe6a48ecb1f3c595
coredump:
format: minidump/core/none
collect: local/sentry
sentry_url: http://127.0.0.1:9000/api/2/minidump/?sentry_key=3203b43fd5384a7dbe6a48ecb1f3c595
data_center:
name: City instance

View File

@@ -8,8 +8,10 @@ cm:
db_static: 0
db_dynamic: 1
sentry_url: http://127.0.0.1:9000/api/2/minidump/?sentry_key=3203b43fd5384a7dbe6a48ecb1f3c595
coredump:
enable: 1/0
collect: local/sentry
sentry_url: http://127.0.0.1:9000/api/2/minidump/?sentry_key=3203b43fd5384a7dbe6a48ecb1f3c595
data_center:
name: City instance

View File

@@ -8,8 +8,10 @@ cm:
db_static: 0
db_dynamic: 1
sentry_url: http://127.0.0.1:9000/api/2/minidump/?sentry_key=3203b43fd5384a7dbe6a48ecb1f3c595
coredump:
enable: 1/0
collect: local/sentry
sentry_url: http://127.0.0.1:9000/api/2/minidump/?sentry_key=3203b43fd5384a7dbe6a48ecb1f3c595
data_center:
name: City instance