Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

docs(awss3): long term retention tutorial #1754

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions docs/tutorial/infinite-retention-aws-s3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
id: infinite-retention-aws-s3
title: Infinite Retention of OpenTelemetry Data in AWS S3
description: Infinite Retention of OpenTelemetry Data in AWS S3
---

## Overview

It is a common practice to backup any data for longer durations due to
compliance and audit purposes. You can use [AWS S3 Exporter][1] to
retain the OpenTelemetry data as long as we need.

## Limitation of AWS S3 Exporter

- Data in AWS S3 is inaccessible in SigNoz UI
- Need to use third-party tool like **Amazon Athena** to query data
- Manual task for adding prefixes for different types of signals like logs,
prashant-shahi marked this conversation as resolved.
Show resolved Hide resolved
metrics, traces

:::info
If you want to query data stored in AWS S3 using **SigNoz** and do not
prashant-shahi marked this conversation as resolved.
Show resolved Hide resolved
have the requirement for infinite or very long retention period, then use
[SigNoz's AWS S3 Retention][2] instead.
:::

## Prerequisites

- Running instance of OpenTelemetry Collector (if not running already, see [Installation Page][3])
- Access to AWS S3 Bucket either using AWS credentials as environment variables
or IAM roles for ECS tasks or EC2 instances (for more details, [see here][4])

## Adding AWS S3 Exporter

In our example, we will use `awss3` exporter for retaining logs data,
where we will be using `us-east-1` region and `otel-data-backup` bucket.

```yaml
exporters:
awss3/logs:
s3uploader:
region: 'us-east-1'
s3_bucket: 'otel-data-backup'
s3_prefix: 'logs'
s3_partition: 'minute'
service:
pipelines:
logs:
exporters: [otlp, awss3/logs]
```

Similarly, we can add it for `metrics` and `traces` pipelines as well with
different prefixes to retain metrics and traces data respectively.

The above configuration needs to be added for your respective OtelCollector(s).

- In case of **SigNoz Self-hosted**, you can add it in SigNoz OtelCollector
configuration to retain all incoming data of `logs` pipelines.
- In case of **SigNoz Cloud**, you will need to update all OtelCollector
configuration that is sending data.
- For **K8s-Infra** helm chart, you can add it in the `otelAgent` configuration.
- For any **Standalone OtelCollector** deployments that is directly sending
data to SigNoz, you can add it in its respective configuration.

List of all supported configuration of `awss3` exporter can be found [here][4].
prashant-shahi marked this conversation as resolved.
Show resolved Hide resolved

---

If you have any feedback or facing issues, feel free to join our slack
community to get help!

[![SigNoz Slack community][5]][6]

[1]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awss3exporter
[2]: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/awss3exporter#aws-credential-configuration
[3]: /docs/install/
[4]: /docs/userguide/retention-period#configuring-cold-storage---amazon-s3
[5]: /img/blog/common/join_slack_cta.webp
[6]: https://signoz.io/slack
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ module.exports = {
'tutorial/setting-up-sso-saml-with-keycloak',
'tutorial/writing-clickhouse-queries-in-dashboard',
'tutorial/traefik-observability',
'tutorial/infinite-retention-aws-s3',
],
},
{
Expand Down
Loading