|
15 | 15 | With version 3.x.x we have dropped support for Node v0.10. This means that |
16 | 16 | future releases under this major version might contain code changes that are |
17 | 17 | incompatible with Node.js v0.10 to an extent of crashing your application. |
18 | | -Please consider updating to a newer runtime, especially that the |
| 18 | +Please consider updating to a newer runtime, especially that the |
19 | 19 | [maintenance of v0.10 has already ended](node-lts). See our compatibility table |
20 | 20 | below. |
21 | 21 |
|
@@ -167,6 +167,58 @@ Accepts a node-style callback to be called when trace stopped. |
167 | 167 | Note: There is no way to restart trace after calling this method. You should end your process after calling this |
168 | 168 | method. |
169 | 169 |
|
| 170 | +## Troubleshooting |
| 171 | + |
| 172 | +### Debug logs |
| 173 | +If you have problems using Trace, e.g it doesn't seem to report anything you can |
| 174 | +turn on logging. We use the lightweight |
| 175 | +(debug)[https://github.com/visionmedia/debug]. If you are not familiar with it |
| 176 | +yet, please read its documentation to learn how it works. |
| 177 | + |
| 178 | + |
| 179 | +#### Quickstart |
| 180 | +To turn it only for Trace start your app with the `DEBUG` |
| 181 | +environment variable set to `risingstack/trace*`. |
| 182 | + |
| 183 | +``` |
| 184 | +DEBUG=risingstack/trace* node my_app.js |
| 185 | +``` |
| 186 | + |
| 187 | +#### Configure logging |
| 188 | + |
| 189 | +To make it possible to filter severities and components in Trace we use |
| 190 | +subnamespaces. The namespace will start with `trace/risingstack` then a `:` then |
| 191 | +a mandatory severity specifier, |
| 192 | +- `error`, |
| 193 | +- `warn` or |
| 194 | +- `info`. |
| 195 | + |
| 196 | +Then come zero or more namespaces led by colons. The namespaces are |
| 197 | +hierarchically organized according to components inside of Trace. |
| 198 | + |
| 199 | +Currently these namespaces (and their subnamespaces) are used: |
| 200 | + |
| 201 | +- `config` |
| 202 | +- `instrumentation` |
| 203 | +- `agent` |
| 204 | +- `agent:tracer` |
| 205 | +- `agent:metrics` |
| 206 | +- `agent:profiler` |
| 207 | +- `agent:security` |
| 208 | +- `api` |
| 209 | + |
| 210 | +As they can have subnamespaces, always append an `*` to them to get all |
| 211 | +messages. |
| 212 | + |
| 213 | +Examples: |
| 214 | + |
| 215 | +- get all error messages: `DEBUG=risingstack/trace:error*` |
| 216 | + |
| 217 | +- get all messages from agents: `DEBUG=risingstack/trace:*:agent*` |
| 218 | + |
| 219 | +- get all error messages and all messages from agents: `DEBUG=risingstack/trace:error*,risingstack/trace:*:agent*` |
| 220 | + |
| 221 | + |
170 | 222 | ## Compatibility with Node versions |
171 | 223 |
|
172 | 224 | * node v0.12@latest |
|
0 commit comments