OpenVAS Scanner  22.7.9
debug_utils.c File Reference

Initialize sentry. More...

#include "debug_utils.h"
#include <gvm/base/logging.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for debug_utils.c:

Go to the source code of this file.

Functions

int init_sentry (void)
 Init sentry. More...
 

Detailed Description

Initialize sentry.

Definition in file debug_utils.c.

Function Documentation

◆ init_sentry()

int init_sentry ( void  )

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().

Here is the caller graph for this function: