# Tsuga Send logs to Tsuga, a bring-your-own-cloud observability platform, through its logs intake API. ## Overview [Tsuga](https://www.tsuga.com/) is an observability platform for logs, metrics, traces and APM that runs in your own AWS, Google Cloud or Azure account. The Tsuga output sends your pipeline's records to your Tsuga cluster's logs intake API, so you can search, alert on and build dashboards over them in Tsuga. Each record is sent as one log entry. Records are sent as JSON exactly as they leave your pipeline. The output doesn't add, remove or rename fields. ## Requirements - Access to the Tsuga portal for your cluster. - Permission to view API keys and create an ingestion API key. - The **Send logs at** URL for your cluster. You'll find it on the same API keys page. ## Get your Tsuga endpoint and ingestion key 1. Sign in to the Tsuga portal and open the **API keys** page. 2. Copy the **Send logs at** URL. It looks like `https://intake..tsuga.com/api/v1/logs`, or uses your own domain if your cluster is set up that way. 3. In the ingestion API key section, create a new key. Choose its owner team and add any tags your organization requires. 4. Copy the key. It starts with `tsuga_in:`. Tsuga shows the full key only once, when it's created. :::note[Ingestion keys, not operation keys] Tsuga has two kinds of API key. This output needs an **ingestion** key, which starts with `tsuga_in:`. Operation keys are for Tsuga's management and query API, and the logs intake rejects them. ::: ## Configuration ### Settings | Setting | Type | Required | Default | Description | | ------- | ---- | -------- | ------- | ----------- | | Endpoint | string | Yes | - | Base URL of the Tsuga cluster's intake, e.g. `https://intake..tsuga.com`. | ### Secrets | Secret | Type | Required | Description | | ------ | ---- | -------- | ----------- | | Ingestion API Key | string | Yes | A Tsuga ingestion API key (starts with `tsuga_in:`). Create one on the API keys page in Tsuga. | ## Details ### Payload format Records are sent as newline-delimited JSON (`application/x-ndjson`), one record per line, with the ingestion key in an `Authorization: Bearer` header. Requests aren't compressed. ### Batching Records are sent in batches of up to 5,000 records or 10 MiB, whichever comes first, at least every 5 seconds. Tsuga accepts request bodies of up to 25 MiB by default. If your cluster is set to a lower limit, Tsuga rejects a request that's too large, and the output resends those records later in smaller requests. A single record that's larger than 25 MiB can't be sent and is dropped. ### Retries When Tsuga asks the output to slow down (HTTP 429), the output waits about a minute and tries again, then waits about two minutes before its last try, as Tsuga recommends. If Tsuga asks it to wait more than two minutes, the output doesn't wait and retries the batch later instead. Other failed requests are retried later too, so records aren't lost when Tsuga is briefly unavailable. ### Tsuga limits to be aware of - **Old records:** Tsuga may drop records that are more than 7 days old when they arrive. Keep this in mind when you backfill historical data. Your Tsuga administrator can ask Tsuga support about this limit. - **Nesting depth:** Tsuga keeps up to 20 levels of nesting in a record and removes anything deeper. Tsuga expands each dot in a field name into a level of nesting. - **Text encoding:** Tsuga replaces invalid UTF-8 in a record with the � character instead of rejecting the record. ## Troubleshooting ### The connection test fails with HTTP 403 Tsuga rejected the ingestion key. Check that you pasted an ingestion key (starting with `tsuga_in:`), not an operation key. A key you've just created can take up to a minute to start working, so wait a minute and test again. ### The endpoint is rejected when you save the output The endpoint must be the **Send logs at** URL: `https`, with the path `/api/v1/logs`. The output rejects the metrics and OpenTelemetry URLs on purpose: Tsuga would accept log data sent to them and then quietly discard it. ### The output reports success, but records don't appear in Tsuga Tsuga confirms each request as soon as it receives it, before it processes and stores the records. A successful send doesn't guarantee the records are searchable. If you can't find them: 1. **Check team visibility.** Tsuga shows records only to users who can see the team that owns them. Ownership comes from the ingestion key's owner team and its team override fields. If you're not an admin, records owned by another team won't show up for you. Ask a Tsuga admin to search for them, or add a `team` field naming your team to your records with a transform in your pipeline. 2. **Check the time range.** Tsuga places records at the timestamp they carry, so records with old or future timestamps fall outside a "last 15 minutes" search. 3. **Check the record age.** Records more than 7 days old when they arrive may be dropped. ## Related Articles - [Tsuga](https://www.tsuga.com/) - [Send data to Tsuga](https://app.tsuga.com/documentation/data-collection/guides/how-to-send-logs-through-the-api) - [Intake Limit and Response](https://app.tsuga.com/documentation/data-collection/guides/intake-limits-and-responses)