You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2020/12/30 15:45:59 UTC

[skywalking-nodejs] branch doc/init created (now 8484f3c)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch doc/init
in repository https://gitbox.apache.org/repos/asf/skywalking-nodejs.git.


      at 8484f3c  Polish the readme to clarify the init options

This branch includes the following new commits:

     new 8484f3c  Polish the readme to clarify the init options

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[skywalking-nodejs] 01/01: Polish the readme to clarify the init options

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch doc/init
in repository https://gitbox.apache.org/repos/asf/skywalking-nodejs.git

commit 8484f3c94bd0b958f9818a917f8a5e3bd6be92ee
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Wed Dec 30 23:45:46 2020 +0800

    Polish the readme to clarify the init options
---
 README.md | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 541215a..bcb42e3 100644
--- a/README.md
+++ b/README.md
@@ -20,15 +20,25 @@ SkyWalking NodeJS SDK requires SkyWalking backend (OAP) 8.0+ and NodeJS >= 10.
 ```typescript
 import agent from 'skywalking';
 
+agent.start();
+```
+
+This will use default configurations to start the SkyWalking agent above, if you want to specify your own configurations, here are two methods.
+
+- Pass those values to `agent.start` method, such as:
+
+```typescript
 agent.start({
-  serviceName: '',
-  serviceInstance: '',
-  collectorAddress: '',
-  authorization: '',
-  maxBufferSize: 1000,
+  serviceName: 'my-service-name',
+  serviceInstance: 'my-service-instance-name',
+  collectorAddress: 'my.collector.address:port',
 });
 ```
 
+note that all options given (including empty/null values) will override the corresponding default values, e.g. `agent.start({ collectorAddress: '' })` will override the default value of `collectorAddress` to empty string, causing errors like `DNS resolution failed`.
+
+- Use environment variables.
+
 The supported environment variables are as follows:
 
 Environment Variable | Description | Default