1 | # gatsby-telemetry
|
2 |
|
3 | Check out: [gatsby.dev/telemetry](https://gatsby.dev/telemetry)
|
4 |
|
5 | ## API
|
6 |
|
7 | ### trackCli(type, tags)
|
8 |
|
9 | Capture an event of type `type` and decorate the generated event with these tags (note: allowed tags are filtered on server side)
|
10 |
|
11 | ### trackError(type, tags)
|
12 |
|
13 | Capture an error of type `type`. The exception maybe passed in tags and it will be sanitize to anonymize the contents.
|
14 |
|
15 | ### trackBuildError(type, tags)
|
16 |
|
17 | Capture an build error of type `type`. The exception maybe passed in tags and it will be sanitize to anonymize the contents.
|
18 |
|
19 | ### setDefaultTags(tags)
|
20 |
|
21 | Set additional tags to be included in all future events.
|
22 |
|
23 | ### decorateEvent(type, tags)
|
24 |
|
25 | Attach additional tags to the next event generated of type `type`.
|
26 |
|
27 | ### setTelemetryEnabled(enabled)
|
28 |
|
29 | Enable or disable the telemetry collection.
|
30 |
|
31 | ### expressMiddleware(type)
|
32 |
|
33 | Returns a debounced events tracker for collecting general activity information for incoming requests.
|
34 |
|
35 | ## ENV Variables
|
36 |
|
37 | - Set `GATSBY_TELEMETRY_DEBUG` to `1` to print the telemetry data instead of sending it over
|
38 | - Set `GATSBY_TELEMETRY_DISABLED` to `1` to opt out of all telemetry
|
39 | - Set `GATSBY_TELEMETRY_VERBOSE` to `1` to log all telemetry
|