HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: /home/mirz4654/public_html/wp-content/plugins/vibes/includes/libraries/decalog-sdk/TracesLogger.php
<?php
/**
 * DecaLog tracer definition.
 *
 * @package SDK
 * @author  Pierre Lannoy <https://pierre.lannoy.fr/>.
 * @since   1.0.0
 */

namespace DecaLog;

/**
 * DecaLog tracer class.
 *
 * This class defines all code necessary to trace with DecaLog.
 * If DecaLog is not installed, it will do nothing and will not throw errors.
 *
 * @package SDK
 * @author  Pierre Lannoy <https://pierre.lannoy.fr/>.
 * @since   1.0.0
 */
class TracesLogger {

	/**
	 * The "true" DTracer instance.
	 *
	 * @since  1.0.0
	 * @var    \Decalog\Plugin\Feature\DTracer    $tracer    Maintains the internal DTracer instance.
	 */
	private $tracer = null;

	/**
	 * Initialize the class and set its properties.
	 *
	 * @param string $class   The class identifier, must be a value in ['plugin', 'theme', 'library'].
	 * @param string $name    Optional. The name of the component that will trigger events.
	 * @param string $version Optional. The version of the component that will trigger events.
	 * @since 1.0.0
	 */
	public function __construct( $class, $name = null, $version = null ) {
		if ( class_exists( '\Decalog\Plugin\Feature\DTracer' ) ) {
			$this->tracer = new \Decalog\Plugin\Feature\DTracer( $class, $name, $version );
		}
	}

	/**
	 * Starts a span.
	 *
	 * @param   string  $name       The name of the span.
	 * @param   string  $parent_id  Optional. The id of the parent. If none, it will be linked to WP root id.
	 * @return  string   Id of started span.
	 * @since   1.0.0
	 */
	public function startSpan( $name, $parent_id = 'xxx' ) {
		if ( $this->tracer ) {
			return $this->tracer->start_span( $name, $parent_id );
		}
		return 'xxx';
	}

	/**
	 * Ends a span.
	 *
	 * @param   string  $id  The id of the span.
	 * @since   1.0.0
	 */
	public function endSpan( $id ) {
		if ( $this->tracer ) {
			$this->tracer->end_span( $id );
		}
	}
}