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
+19-7Lines changed: 19 additions & 7 deletions
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
@@ -82,7 +88,7 @@ public static function __callStatic($methodName, $args)
82
88
83
89
privatestaticfunctionenrichLog()
84
90
{
85
-
// This should probably implemented as a Monolog Processor
91
+
// We should probably implement this as a Monolog Processor
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