Initialize sentry.
More...
#include "debug_utils.h"
#include <gvm/base/logging.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
Initialize sentry.
Definition in file debug_utils.c.
◆ init_sentry()
Init sentry.
- Returns
- 0 on success, -1 on error.
Definition at line 23 of file debug_utils.c.
24{
25 char *sentry_dsn_openvas = NULL;
26 char version[96];
27
28 snprintf (version, sizeof (version), "openvas@%s", OPENVAS_VERSION);
29
30 sentry_dsn_openvas = getenv ("SENTRY_DSN_OPENVAS");
31 if (FALSE
32 == (gvm_has_sentry_support () && sentry_dsn_openvas
33 && *sentry_dsn_openvas))
34 {
35 return -1;
36 }
37 else
38 {
39 gvm_sentry_init (sentry_dsn_openvas, version);
40 return 0;
41 }
42}
Referenced by openvas(), and pre_fn_call().