Polish the readme to clarify the init options (#17)
diff --git a/README.md b/README.md
index 541215a..bcb42e3 100644
--- a/README.md
+++ b/README.md
@@ -20,15 +20,25 @@
```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