Skip to content

Commit 5e214dd

Browse files
committed
doc: Update readme
1 parent 7a3acbe commit 5e214dd

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ As Trace uses scoped packages, be sure to use npm version greater than 2.7.0.
3232
npm install --save @risingstack/trace
3333
```
3434

35-
*If you can't update to [email protected] for whatever reason, you can still install Trace using `npm i risingstack/trace-nodejs`.*
35+
> ⚠️
36+
37+
>Trace depends on a couple of native addons. We host precompiled
38+
binaries of these for Linux and Darwin 64-bit platforms at https://oss.risingstack.com.
39+
The installer will attempt to download these dependencies, so it should be allowed
40+
through your firewall, or else the download will fail and the installer will fall back
41+
to building from source. This also happens if there isn't a precompiled binary for your platform. Note that compiling native addons requires native toolchain.
3642

3743
After you installed Trace as a dependency, you just require it at the beginning of your main file.
3844
```javascript
@@ -95,13 +101,14 @@ module.exports = {
95101

96102
For the complete set of configuration options, visit the [docs](https://trace-docs.risingstack.com/docs/advanced-usage#section-available-options).
97103

98-
*Note: Custom reporters are no longer supported in trace 2.x*
99104

100-
*Note: If you are running your app with NODE_ENV=test, Trace won't start*
105+
> ⚠️
106+
107+
>If you are running your app with NODE_ENV=test, Trace won't start
101108
102109
## API
103110

104-
### trace.report(String, [Object])
111+
### trace.report(name, object)
105112

106113
This method can be use to report additional data to the Trace servers which later on helps with debugging.
107114

@@ -114,10 +121,9 @@ trace.report('name', {
114121
Throws an error if first parameter is not a String.
115122
Throws an error if second parameter is not an Object.
116123

117-
### trace.reportError(String, Error)
124+
### trace.reportError(name, error)
118125

119-
This method can be used to send errors to the Trace servers - note that transactions that use
120-
this method are not subject to sampling, so it will be collected all the time.
126+
This method can be used to send errors to the Trace servers.
121127

122128
```javascript
123129
trace.reportError('mysql_error', new Error('connection refused'));
@@ -155,7 +161,7 @@ trace.incrementMetric('user/signup')
155161

156162
The name must have the following format: `<Category>/<Name>`
157163

158-
### trace.stop()
164+
### trace.stop([cb])
159165

160166
This method gracefully stops trace.
161167

@@ -242,6 +248,8 @@ module.exports = {
242248

243249
Also, from `2.x` you can specify these values using only environment variables: `TRACE_SERVICE_NAME` and `TRACE_API_KEY`.
244250

251+
Custom reporters are no longer supported in trace 2.x*
252+
245253
### Versions below 3.x
246254

247255
We dropped support for Node v0.10. [Update your runtime](node) to a more recent version to continue using Trace.

0 commit comments

Comments
 (0)