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: README.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,4 +23,25 @@ If you wish to see more logs, simply set the `LOG_LEVEL` to the desired level. H
23
23
| NOTICE | Logs that track the general flow of the application. This is the default level ||
24
24
| WARNING | Logs that highlight an abnormal or unexpected event in the application flow, but do not otherwise cause the application execution to stop. ||
25
25
| ERROR | Logs that highlight when the current flow of execution is stopped due to a failure. These should indicate a failure in the current activity, not an application-wide failure. ||
26
-
| CRITICAL | Logs that describe an unrecoverable application or system crash, or a catastrophic failure that requires immediate attention. ||
26
+
| CRITICAL | Logs that describe an unrecoverable application or system crash, or a catastrophic failure that requires immediate attention. ||
27
+
28
+
29
+
## Add traces to log
30
+
31
+
A great feature of Datadog is to correlate traces and logs to make troubleshooting easier.
32
+
33
+
To take advantage of this, you will need to:
34
+
- install the `dd-trace` package
35
+
- import it and init it with `logInjection:true`.
36
+
- BuffLog will append automatically the traces to the logs (only within a request)
37
+
38
+
```js
39
+
// make sure to put those lines at the very beginning of your service
40
+
importtracerfrom"dd-trace";
41
+
tracer.init({
42
+
// will automatically append the traces to BuffLog
0 commit comments