Skip to content

Commit 63a625f

Browse files
committed
README.md wip
1 parent e7e8c2c commit 63a625f

1 file changed

Lines changed: 21 additions & 11 deletions

File tree

README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,22 @@ In the startup section of your `index.js` or `index.ts` add the following code b
3434

3535
---
3636
```javascript
37-
const { Rotel } = require("@streamfold/rotel");
37+
const { Rotel,Config } = require("@streamfold/rotel");
38+
const { Client } require("@streamfold/rotel/client");
3839

3940
const rotel = new Rotel({
4041
enabled: true,
41-
exporter: {
42-
endpoint: "https://foo.example.com",
43-
headers: {
44-
"x-api-key" : "xxxxx",
45-
}
46-
},
42+
exporters: {
43+
"otlp" : Config.otlp_exporter({
44+
endpoint: "https://foo.example.com",
45+
headers: {
46+
"x-api-key": "xxxxx",
47+
},
48+
}),
49+
},
50+
exporters_traces: ["otlp"],
51+
│ exporters_metrics: ["otlp"],
52+
│ exporters_logs: ["otlp"],
4753
})
4854
rotel.start()
4955
```
@@ -58,8 +64,12 @@ new Rotel().start();
5864

5965
In your application deployment configuration, set the following environment variables. These match the typed configuration above:
6066
* `ROTEL_ENABLED=true`
61-
* `ROTEL_OTLP_EXPORTER_ENDPOINT=https://foo.example.com`
62-
* `ROTEL_OTLP_EXPORTER_CUSTOM_HEADERS=x-api-key={API_KEY}`
67+
* `ROTEL_EXPORTERS=otlp`
68+
* `ROTEL_EXPORTER_OTLP_ENDPOINT=https://foo.example.com`
69+
* `ROTEL_EXPORTER_OTLP_CUSTOM_HEADERS=x-api-key={API_KEY}`
70+
* `ROTEL_EXPORTERS_TRACES=otlp`
71+
* `ROTEL_EXPORTERS_METRICS=otlp`
72+
* `ROTEL_EXPORTERS_LOGS=otlp`
6373

6474
Any typed configuration options will override environment variables of the same name.
6575

@@ -77,7 +87,7 @@ To set the endpoint the OpenTelemetry SDK will use, set the following environmen
7787

7888
## Configuration
7989

80-
This is the full list of options and their environment variable alternatives. Any defaults left blank in the table are either False or None.
90+
This is the full list of options and their environment variable alternatives. Any defaults left blank in the table are either False or None.
8191

8292
| Option Name | Type | Environ | Default | Options |
8393
|--------------------------------|--------------|--------------------------------------|----------------------|-----------------|
@@ -93,7 +103,7 @@ This is the full list of options and their environment variable alternatives. An
93103
| otlp_receiver_logs_disabled | boolean | ROTEL_OTLP_RECEIVER_LOGS_DISABLED | | |
94104
| exporter | OTLPExporter | | | |
95105

96-
The OTLPExporter can be enabled with the following options.
106+
The OTLPExporter can be enabled with the following options. To construct an OTLP exporter, use the method `Config.otlp_exporter()` with the following options.
97107

98108
| Option Name | Type | Environ | Default | Options |
99109
|------------------------|------------------------|--------------------------------------------|---------|--------------|

0 commit comments

Comments
 (0)