Skip to content

Commit

Permalink
refactor: Update APIKeyView and TelemetryIngestionKeyView to use Rout…
Browse files Browse the repository at this point in the history
…eUtil.populateRouteParams

This refactor updates the APIKeyView and TelemetryIngestionKeyView components to use the RouteUtil.populateRouteParams function when navigating to other routes. This ensures that route parameters are properly populated, improving the reliability and consistency of the navigation logic.
  • Loading branch information
simlarsen committed Aug 2, 2024
1 parent 0d40be3 commit 9dc31fe
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
14 changes: 8 additions & 6 deletions App/FeatureSet/Docs/Content/telemetry/fluentd.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,25 @@ You can find the full list of supported sources [here](https://www.fluentd.org/d
- **Step 1: Install Fluentd on your system** - You can install Fluentd using the instructions provided [here](https://docs.fluentd.org/installation)
- **Step 2: Sign up for OneUptime account** - You can sign up for a free account [here](https://oneuptime.com). Please note while the account is free, log ingestion is a paid feature. You can find more details about the pricing [here](https://oneuptime.com/pricing).
- **Step 3: Create OneUptime Project** - Once you have the account, you can create a project from the OneUptime dashboard. If you need any help with creating a project or have any questions, please reach out to us at support@oneuptime.com
- **Step 4: Create a OneUptime Telemetry Service on OneUptime Dashboard**
- **Step 4: Create Telemetry Ingestion Token** - Once you have created a OneUptime account, you can create a telemetry ingestion token to ingest logs, metrics and traces from your application.

On the telemetry service page, click on "Create Telemetry Service" button.
After you sign up to OneUptime and create a project. Click on "More" in the Navigation bar and click on "Project Settings".

![Create Service](/docs/static/images/CreateService.png)
On the Telemetry Ingestion Key page, click on "Create Ingestion Key" to create a token.

Once you create a telemetry service, click on "View Service" and you will be redirected to the telemetry service page.
![Create Service](/docs/static/images/TelemetryIngestionKeys.png)

Click on View Service Token and copy the token. You will need this token to configure the telemetry service. **Please keep this token safe.**
Once you created a token, click on "View" to view the token.

![View Service](/docs/static/images/ViewServiceToken.png)
![View Service](/docs/static/images/TelemetryIngestionKeyView.png)


## Configuration

You can use the following configuration to send the telemetry data to the OneUptime HTTP Source. You can add this configuration to the fluentd configuration file. The configuration file is usually located at `/etc/fluentd/fluent.conf` or `/etc/td-agent/td-agent.conf`.

You need to replace the `YOUR_SERVICE_TOKEN` with the token you created in the previous step. You also need to replace the `YOUR_SERVICE_NAME` with the name of your service. name of the service can be any name you like. If the service does not exist in OneUptime, it will be created automatically.

```yaml
# Match all patterns
<match **>
Expand Down
21 changes: 10 additions & 11 deletions App/FeatureSet/Docs/Content/telemetry/open-telemetry.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# Integrate OpenTelemetry (logging, metrics and traces) with OneUptime.

### Step 1 - Create a OneUptime Telemetry Service.
### Step 1 - Create Telemetry Ingestion Token.

Once you have created a OneUptime account, you can create a telemetry service by clicking on the "Add Service" button.
Once you have created a OneUptime account, you can create a telemetry ingestion token to ingest logs, metrics and traces from your application.

After you sign up to OneUptime and create a project. Click on more in the Navigation bar and click on "Telemetry".
After you sign up to OneUptime and create a project. Click on "More" in the Navigation bar and click on "Project Settings".

On the telemetry service page, click on "Create Telemetry Service" button.
On the Telemetry Ingestion Key page, click on "Create Ingestion Key" to create a token.

![Create Service](/docs/static/images/CreateService.png)
![Create Service](/docs/static/images/TelemetryIngestionKeys.png)

Once you create a telemetry service, click on "View Service" and you will be redirected to the telemetry service page.
Once you created a token, click on "View" to view the token.

Click on View Service Token and copy the token. You will need this token to configure the telemetry service. Please keep this token safe.

![View Service](/docs/static/images/ViewServiceToken.png)
![View Service](/docs/static/images/TelemetryIngestionKeyView.png)


### Step 2 - Configure the telemetry service in your application.
Expand Down Expand Up @@ -42,16 +40,17 @@ Once you have configured the telemetry service in your application, you can inte

| Environment Variable | Value |
| --- | --- |
| OTEL_EXPORTER_OTLP_HEADERS | x-oneuptime-token=<YOUR_ONEUPTIME_SERVICE_TOKEN> |
| OTEL_EXPORTER_OTLP_HEADERS | x-oneuptime-token=YOUR_ONEUPTIME_SERVICE_TOKEN |
| OTEL_EXPORTER_OTLP_ENDPOINT | https://otlp.oneuptime.com |
| OTEL_SERVICE_NAME | <NAME_OF_YOUR_SERVICE> |
| OTEL_SERVICE_NAME | NAME_OF_YOUR_SERVICE |


**Example**

```bash
export OTEL_EXPORTER_OTLP_HEADERS=x-oneuptime-token=9c8806e0-a4aa-11ee-be95-010d5967b068
export OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.oneuptime.com
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`)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions App/FeatureSet/Home/Views/Partials/reviews.ejs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

<section id="reviews" aria-labelledby="reviews-title" class="pb-16 pt-20 sm:pb-24 sm:pt-32 bg-gray-50 border-gray-100 border-t-2 border-b-2">

<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 rounded bg-gray-50">
<h2 id="reviews-title" class="text-3xl font-medium tracking-tight text-gray-900 sm:text-center bg-gray-50">Here's what developers say about us.</h2>
<p class="mt-2 text-lg text-gray-600 sm:text-center bg-gray-50">OneUptime is used by thousands of companies worldwide. Here's what they say about us.</p>
<h2 id="reviews-title" class="text-4xl font-semibold tracking-tight text-gray-900 sm:text-center">Here's what developers say about us.</h2>
<p class="mt-5 text-xl text-gray-500 sm:text-center">OneUptime is used by thousands of companies worldwide. Here's what they say about us.</p>
<div
class="bg-gray-50 relative -mx-4 mt-16 grid h-[49rem] max-h-[150vh] grid-cols-1 items-start gap-8 overflow-hidden px-4 sm:mt-20 md:grid-cols-2 lg:grid-cols-3">
<div class="animate-marquee space-y-8 py-4" style="--marquee-duration: 28320ms;">
Expand Down
6 changes: 5 additions & 1 deletion CommonServer/Utils/Telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ export default class Telemetry {
});
}

const loggerProvider: LoggerProvider = new LoggerProvider();
const loggerProvider: LoggerProvider = new LoggerProvider({
resource: this.getResource({
serviceName: data.serviceName,
}),
});

if (this.getOltpLogsEndpoint() && hasHeaders) {
const logExporter: OTLPLogExporter = new OTLPLogExporter({
Expand Down

0 comments on commit 9dc31fe

Please sign in to comment.