Skip to content
Merged
Changes from all 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
2 changes: 1 addition & 1 deletion monitoring/logs-api-options.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

```
GET /api/v1/apps/:app_name/logs
Authorization: Bearer <your-token>
Authorization: <your-token>
```

You’ll get a stream of newline-delimited JSON log lines. You can pass query params like:
Expand Down Expand Up @@ -69,16 +69,16 @@

**Things to know:**

- You’ll need to handle reconnections: if the network drops or the proxy restarts, your subscriber needs to reconnect and resume without losing messages.

Check warning on line 72 in monitoring/logs-api-options.html.md

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 [Fly.Spelling] Is 'reconnections' a typo? Raw Output: {"message": "[Fly.Spelling] Is 'reconnections' a typo?", "location": {"path": "monitoring/logs-api-options.html.md", "range": {"start": {"line": 72, "column": 25}}}, "severity": "INFO"}
- You’ll need to handle backpressure: if your app can’t process logs fast enough, messages might pile up and get dropped. Design your consumer to either keep up or fail gracefully.

Check warning on line 73 in monitoring/logs-api-options.html.md

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 [Fly.Spelling] Is 'backpressure' a typo? Raw Output: {"message": "[Fly.Spelling] Is 'backpressure' a typo?", "location": {"path": "monitoring/logs-api-options.html.md", "range": {"start": {"line": 73, "column": 25}}}, "severity": "INFO"}
- If you want to dedupe across subscribers, use NATS queue groups.

Check warning on line 74 in monitoring/logs-api-options.html.md

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 [Fly.Spelling] Is 'dedupe' a typo? Raw Output: {"message": "[Fly.Spelling] Is 'dedupe' a typo?", "location": {"path": "monitoring/logs-api-options.html.md", "range": {"start": {"line": 74, "column": 18}}}, "severity": "INFO"}
- NATS only streams logs from starting from the moment you connect. You won’t get any history unless you’ve been subscribed the whole time.

For more details on connecting to Fly’s NATS log stream (authentication, subject patterns, example clients), head over to the [Observability for User Apps](/docs/blueprints/observability-for-user-apps/?utm_source=chatgpt.com#streaming-fly-app-logs-to-your-end-users) guide.

### 3. Log Shipper to External Sink

If you want durable, queryable logs, export them. We maintain a small app called the [Fly Log Shipper](https://github.com/superfly/fly-log-shipper) that listens to NATS and forwards logs to sinks like Loki, Datadog, Elastic, Honeycomb, or even S3.

Check warning on line 81 in monitoring/logs-api-options.html.md

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 [Fly.Spelling] Is 'Datadog' a typo? Raw Output: {"message": "[Fly.Spelling] Is 'Datadog' a typo?", "location": {"path": "monitoring/logs-api-options.html.md", "range": {"start": {"line": 81, "column": 208}}}, "severity": "INFO"}

Check warning on line 81 in monitoring/logs-api-options.html.md

View workflow job for this annotation

GitHub Actions / Vale linter

[vale] reported by reviewdog 🐶 [Fly.Spelling] Is 'queryable' a typo? Raw Output: {"message": "[Fly.Spelling] Is 'queryable' a typo?", "location": {"path": "monitoring/logs-api-options.html.md", "range": {"start": {"line": 81, "column": 22}}}, "severity": "INFO"}

The log shipper is a prebuilt Fly app running Vector, with configuration you can customize via TOML. It subscribes to log subjects and streams data wherever you want.

Expand Down
Loading