Skip to content

Commit

Permalink
refactor: Update telemetry documentation and add OpenTelemetry collec…
Browse files Browse the repository at this point in the history
…tor configuration
  • Loading branch information
simlarsen committed Aug 30, 2024
1 parent 2269681 commit 6fb4773
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion App/FeatureSet/Docs/Content/telemetry/open-telemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Once you created a token, click on "View" to view the token.
![View Service](/docs/static/images/TelemetryIngestionKeyView.png)


### Step 2 - Configure the telemetry service in your application.
### Step 2

#### Configure the telemetry service in your application.

#### Application Logs

Expand Down Expand Up @@ -56,3 +58,17 @@ export OTEL_SERVICE_NAME=my-service
If you're self-hosting oneuptime, this can be changed to your self hosted OpenTelemetry collector endpoint (eg: `http(s)://<your-oneuptime-host>/otlp`)

Once you run your application, you should see the logs in the OneUptime telemetry service page. Please contact [email protected] if you need any help.


#### Using OpenTelemetry Collector

You can also use the OpenTelemetry collector instead of sending telemetry data directly from your application.
If you are using OpenTelemetry Collector, you can configure the OneUptime exporter in the collector configuration file.

```yaml
exporters:
otlphttp:
endpoint: "https://otlp.oneuptime.com"
headers: {"Content-Type": "application/json", "x-oneuptime-token": "YOUR_TOKEN"}
encoding: "json"
```
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RunCron(
},
async () => {
return await Telemetry.startActiveSpan<Promise<void>>({
name: "StatusPageCerts:OrderSSL",
name: "StatusPageCerts.OrderSSL",
options: {
attributes: {
schedule: IsDevelopment ? EVERY_FIFTEEN_MINUTE : EVERY_FIFTEEN_MINUTE,
Expand Down

0 comments on commit 6fb4773

Please sign in to comment.