You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -37,8 +40,10 @@ static public function getLogger()
37
40
protectedstaticfunctionconfigureInstance()
38
41
{
39
42
40
-
if (!class_exists("\DDTrace\GlobalTracer")) {
41
-
error_log("Tip #1: Can't find \DDTrace\GlobalTracer class. Did you install the Datadog APM tracer extension? It will allow you to have logs enriched with traces making troubleshooting easier! :)");
43
+
if (class_exists("\DDTrace\GlobalTracer")) {
44
+
self::$hasGlobalTracer = true;
45
+
} else {
46
+
error_log("Tip #1: Can't find \DDTrace\GlobalTracer class. Did you install the Datadog APM tracer extension? It will allow you to have logs enriched with traces making troubleshooting easier.");
42
47
error_log("Tip #2: If you run a cli mode service (such as a worker), did you set the DD_TRACE_CLI_ENABLED env variable?");
43
48
}
44
49
@@ -61,6 +66,36 @@ protected static function configureInstance()
// We should grab any Buffer information useful when available
96
-
// Need to check with the Core team: accountID / userID / profileID
97
-
// $user = Buffer/Core::getCurrentUser();
98
-
// That should look like:
99
-
// $record['context']['user'] = array(
100
-
// 'accountID' => $user->getAccountID(),
101
-
// 'userID' => $user->getUserID(),
102
-
// 'profileID' => $user->getProfileID()
103
-
// );
104
-
105
-
try {
106
-
107
-
if (class_exists("\DDTrace\GlobalTracer", false) === false) {
108
-
thrownew \Exception('DDTrace\GlobalTracer can\'t be found. Have you setup the Datadog Tracer extension? If you run cli worker, have you added the DD_TRACE_CLI_ENABLED env variable?');
109
-
}
110
-
111
-
// Add traces information to be able to correlate logs with APM
0 commit comments