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
Copy file name to clipboardExpand all lines: src/BuffLog/BuffLog.php
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,12 @@ static public function getLogger()
36
36
37
37
protectedstaticfunctionconfigureInstance()
38
38
{
39
+
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! :)");
42
+
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
+
}
44
+
39
45
// @TODO: We could potentially use the Kubernetes downward API to
40
46
// define the logger name. This will make it easier for developers
41
47
// to read and friendlier to identify where come the logs at a glance
@@ -105,7 +111,7 @@ private static function enrichLog()
105
111
];
106
112
107
113
} catch (Exception$e) {
108
-
error_log($e->getMessage() . "If you run a cli mode service (such as a worker), did you set the DD_TRACE_CLI_ENABLED env variable?");
114
+
error_log($e->getMessage() . "Can't add trace to logs. Have you setup the Datadog Tracer extension? If you run a worker have your added the DD_TRACE_CLI_ENABLED env variable?");
0 commit comments