---
title: "Connect your app to LogBrew"
description: "Pick your platform, install the SDK, and send your first signal."
canonical: "https://logbrew.co/en/docs"
last_updated: "2026-11-23"
---

# Connect your app to LogBrew
Pick your platform, install the SDK, and send your first signal.

## Set up with 1 command
Run it in your app folder. It detects the framework, signs you in, installs the SDK, writes the key, adds the init code, and sends a test event. It asks before it changes a file.

```bash
npx logbrew-cli@latest setup
```

For coding agents:

```bash
npx logbrew-cli@latest setup --yes --json
```

# Choose platform
Pick what you're building. Choose the same platform when you add the project.

## Node.js service
Use the Node.js package when a backend service needs logs, request spans, actions, releases, and metrics.

```bash
npm install @logbrew/sdk @logbrew/node
```
Next: Follow the Node Steps

## Express service
Use the Express package when a Node service handles requests through Express middleware. Errors with a 4xx status stay on the request, and other errors become issues. Set `captureClientErrors: true` to report 4xx errors too.

```bash
npm install @logbrew/sdk @logbrew/express express
```
Next: Add a Project

## Fastify service
Use the Fastify package when a Node service handles routes through Fastify plugins.

```bash
npm install @logbrew/sdk @logbrew/fastify fastify
```
Next: Add a Project

## JavaScript app
Use the JavaScript browser package for frontend pages that emit product actions, logs, and lightweight client signals. It also tags each visit with its campaign and referring site.

```bash
npm install @logbrew/sdk @logbrew/browser
```
Next: Add a Project

## Next.js app
Use the Next.js package when routes, server rendering, and client actions need one setup path.

```bash
npm install @logbrew/sdk @logbrew/next next react react-dom
```
Next: Add a Project

## React app
Use the React package for component-driven web apps that send user actions and UI state.

```bash
npm install @logbrew/sdk @logbrew/react react
```
Next: Add a Project

## Angular app
Use the Angular package when framework routing and app errors should share one setup path.

```bash
npm install @logbrew/sdk @logbrew/angular @angular/core
```
Next: Add a Project

## Vue app
Use the Vue package for Vue apps that need clear product actions and browser-side signals.

```bash
npm install @logbrew/sdk @logbrew/vue vue
```
Next: Add a Project

## Svelte app
Use the Svelte package for Svelte apps that need a direct SDK install path.

```bash
npm install @logbrew/sdk @logbrew/svelte svelte
```
Next: Add a Project

## NestJS service
Use the NestJS package when a Node service is organized around Nest modules and request handling.

```bash
npm install @logbrew/sdk @logbrew/nestjs @nestjs/common @nestjs/core @nestjs/platform-express reflect-metadata rxjs
```
Next: Add a Project

## Python service
Start with the core package for Python workers and services.

```bash
python3 -m pip install logbrew-sdk
```
Next: Add a Project

## Django app
Use the Django package for request and app signals from a Django or Wagtail project.

```bash
python3 -m pip install logbrew-sdk logbrew-django
```
Next: Add a Project

## FastAPI service
Use the FastAPI package for Python APIs with explicit request spans and actions.

```bash
python3 -m pip install logbrew-sdk logbrew-fastapi
```
Next: Add a Project

## .NET service
Install the .NET package when a service owns server-side signals.

```bash
dotnet add package LogBrew
```
Next: Add a Project

## ASP.NET Core app
Use the ASP.NET Core package when .NET request handling and web app signals need one setup path.

```bash
dotnet add package LogBrew.AspNetCore
```
Next: Add a Project

## Java service
Use the JVM package for Java services that need app-owned logs, request spans, and product actions.

```bash
implementation("co.logbrew:logbrew-sdk:0.1.15")
```
Next: Add a Project

## Go service
Add the Go package when a service owns explicit logs, spans, metrics, and trace context.

```bash
go get github.com/LogBrewCo/sdk/go/logbrew
```
Next: Add a Project

## PHP app
Use Composer for PHP services and app-owned request signals.

```bash
composer require logbrew/sdk
```
Next: Add a Project

## Ruby service
Use the Ruby gem for Ruby services that need explicit app and request signals.

```bash
gem install logbrew-sdk
```
Next: Add a Project

## Rust service
Add the Rust crate for services that build their own logs, spans, actions, and metrics.

```bash
cargo add logbrew
```
Next: Add a Project

## iOS app
Use the Apple platform package for iOS apps that send explicit product signals.

```bash
.package(url: "https://github.com/LogBrewCo/sdk.git", from: "0.1.26")
```
Next: Add a Project

## Android app
Use the Android package for apps that send app-owned signals from the Android runtime.

```bash
implementation("co.logbrew:logbrew-kotlin:0.2.3")
```
Next: Add a Project

## React Native app
Use the React Native package for mobile apps that share JavaScript product actions.

```bash
npm install @logbrew/sdk @logbrew/react-native react react-native
```
Next: Add a Project

## Unity app
Use the Unity package for games or simulations that send product actions and runtime signals.

```bash
openupm add co.logbrew.unity
```
Next: Add a Project

## C app
Use the C sources for native services or embedded apps that need direct signal control.

```bash
cc -std=c99 -Wall -Wextra -Wpedantic -Iinclude src/logbrew.c src/logbrew_json.c src/logbrew_context.c src/logbrew_evidence.c src/logbrew_metric.c src/logbrew_recording_transport.c src/logbrew_timeline.c src/logbrew_trace.c your_app.c -o your_app
```
Next: Add a Project

## C++ app
Run the released CLI plan in a CMake 3.16+ C++17 project. Link LogBrew::LogBrew. Enable LogBrew::HttpTransport and libcurl only when hosted delivery is required.

```bash
logbrew setup --json
```
Next: Add a Project

## More ways to connect
- OpenTelemetry (OTLP): Send logs, traces, and metrics from any OpenTelemetry SDK or Collector. https://docs.logbrew.co/guides/opentelemetry
- Supabase: Send platform logs with a log drain, and Edge Function errors with the JavaScript SDK. https://docs.logbrew.co/guides/supabase
- GitHub Action: Upload source maps and symbol files, and record each deploy from your workflow. https://docs.logbrew.co/guides/github-action

## Setup path at a glance
Use this order to move from docs to a verified product action without leaving the setup flow.

- Install. Add package: Start with the SDK package for your runtime.
- Create. Create project: Add a project and copy its credential. LogBrew shows it only once.
- Send. Send a test action: Run the bundled example before you change your app code.
- Verify. Check logs: Confirm the signal in logs or with the CLI.

# Your first signal in 4 steps
Install the package, add a project, send a test action, and check it in LogBrew.

## First-signal setup needs
Direct SDK ingestion keeps the setup path short.

- Collector: No local agent. Install the SDK package and send directly to the LogBrew API.
- Credential: One project credential. Copy it from Add Project only when creating or setting up that project.
- Proof: Verify in logs. Send one info signal, then confirm it before wider instrumentation.

## AI assistant context
Give an agent the public LogBrew map before it edits your app or setup command.

```bash
curl -L https://logbrew.co/llms.txt
```

### installation prompt
```bash
Read https://logbrew.co/llms.txt, then choose the matching SDK card at https://logbrew.co/en/docs#docs-sdk-choice-title. Use npm install @logbrew/sdk @logbrew/node only for a server-side Node.js service. For Next.js, React, iOS, Android, or React Native, use the selected card and Add Project prompt. Ask the signed-in user to open Add Project and place credentials only in the matching app environment. For server-side Node.js, the env var is LOGBREW_SERVER_API_KEY. Run node node_modules/@logbrew/node/examples/first-useful-telemetry.mjs only for Node services, then verify with logbrew logs info --json. Do not ask for credentials in chat or commits.
```
Next: Open Agent Guide

## Install SDK
Use the Node packages for a backend service that needs logs, spans, actions, releases, and metrics.

```bash
npm install @logbrew/sdk @logbrew/node
```


## Create project
Add a project, pick your platform, and copy its ingest credential. LogBrew shows it only once.

Next: Add a Project

## Send a test action
Run the bundled example before you change your app code.

```bash
node node_modules/@logbrew/node/examples/first-useful-telemetry.mjs
```


## Verify in LogBrew
An accepted send doesn't prove the event is readable. Find the test signal in Logs, or read it back with a read key as LOGBREW_TOKEN. If you already have one, use it.

```bash
logbrew logs info --json
```
Next: Verify With a Read Key

# Node.js setup, step by step
Set up a Node.js service and verify its first telemetry. Add Project creates the project and shows its ingest credential once. The steps below cover installation and verification.

## Add the JavaScript SDK packages
Start with the core SDK and Node helper when a backend service needs logs, request spans, actions, releases, and metrics.

```bash
npm install @logbrew/sdk @logbrew/node
```

## Add a project in LogBrew
Sign in, add a project, pick your platform, and copy its ingest credential. LogBrew shows it only once.


## Run the first SDK signal example
Use the installed package example to inspect the release, environment, request span, product action, network milestone, and metric shape before wiring your app.

```bash
node node_modules/@logbrew/node/examples/first-useful-telemetry.mjs
```

## Read the first signal in LogBrew
After the SDK sends an info signal with the project credential, use the CLI or dashboard logs view to confirm it arrived before adding more instrumentation.

```bash
logbrew logs info --json
```

# Common CLI tasks
## Check whether LogBrew is ready
Run status first to confirm reachability, sign-in state, and the next safe read.

```bash
logbrew status --json
```

## Start from the latest failures
Read recent error logs, then move into issues or traces when a release or project needs context.

```bash
logbrew logs error --json
```

## Share a stable issue view
List open issues when a teammate needs the same failure groups.

```bash
logbrew issues open --json
```

# CLI commands
## Install
Or run npx logbrew-cli@latest, or brew install LogBrewCo/tap/logbrew. There is no @logbrew/cli package.

```bash
npm install -g logbrew-cli
```

## Sign in without a browser
Open the printed link on any device and approve the code. This works for SSH, containers, CI, and agent sessions.

```bash
logbrew login --device
```

## Status
Check local auth, API reachability, and recovery steps before any private read. To use a read key from .env, run set -a; . ./.env; set +a first.

```bash
logbrew status --json
```

## Logs
Start with recent errors when a release, project, or trace needs context.

```bash
logbrew logs error --json
```

## Issues
List open failure groups before deciding whether to resolve, close, ignore, or reopen.

```bash
logbrew issues open --json
```

## Investigate
After logbrew issues --json, read one issue's affected users, ordered evidence, likely cause, fix, and data limits.

```bash
logbrew investigate issue <issue_id> --json
```

## Trace detail
Read a known trace id when logs or issues point to one failing request.

```bash
logbrew trace <trace_id> --json
```

## Actions
Filter user events by name when the important context is a product action.

```bash
logbrew actions --name checkout_failed --json
```

## Analytics
Answer questions about sources, funnels, conversion, and retention with analytics, not raw actions. Each answer shows the previous period and example IDs.

```bash
logbrew analytics funnel --project <id> --since 24h --step page-view / --step interaction signup_completed --breakdown tag.utm_source --json
```

## Releases
Compare rollout context with log, issue, trace span, and action counts.

```bash
logbrew releases --json
```

## Billing
Print a short-lived checkout link for Pro or Business so a person can pay in the browser. logbrew billing portal prints the link for invoices, payment method, and cancellation.

```bash
logbrew billing upgrade pro --json
```

## Check local auth and API reachability
The first read should tell you whether the CLI can reach the LogBrew API without exposing token material.

- Use JSON mode when a script or automation needs stable fields.
- Use human output when a developer needs the next command.
- Keep auth recovery pointed back to sign-in and status.

## Read production signals by resource
Start with the signal that answers your question. Open its details for related evidence.

- Logs keep severity, release, environment, project, trace, and search filters.
- Check an issue’s status and last occurrence before you investigate it.
- Traces keep span names, release context, environment context, and project scope.

## Send useful context without exposing project data
Use public docs, Markdown, and copyable commands when someone needs setup help or a safe handoff.

- Share a docs link when the next step is setup or command discovery.
- Share Markdown when plain text is easier than a screenshot.
- Share private project data only with people who have permission to see it.

## Choose the project and time range
Use the telemetry API reference for supported routes, filters, and success and error examples.

- Authenticate before you request private project data.
- Select the project and time range before you compare results.
- Follow the returned recovery steps when a request fails.
- Keep missing evidence separate from evidence that could not be loaded.

## Where visitors come from
The browser SDK tags every event of a visit with its campaign and referring site. You add no code.

- The tags are tag.utm_source, tag.utm_medium, tag.utm_campaign, and tag.referrer_domain.
- Only these 3 UTM values and the referring host are kept. Other query values and the referrer path are never read.
- To turn it off, set captureAttribution: false.
- To compare 2 sources, run logbrew analytics compare --project <id> --since 24h --target-kind interaction --target-event signup_completed --segment newsletter=Newsletter --segment-property newsletter:tag.utm_source=newsletter --segment ads=Ads --segment-property ads:tag.utm_source=ads --json

## Limits
- Telemetry reads: Each account runs up to 8 telemetry reads at once across the API, dashboard, and MCP. An extra read waits up to 5 seconds, then gets 429 with a Retry-After header.
- Live connections: Each account keeps up to 10 live connections open, and each IP address up to 20. A new connection past either limit gets 429 with a Retry-After header.
- Sending limits: After a short rate limit, the SDKs wait for the Retry-After time and send the same events again on their own. Only the plan limit pauses delivery.

## Public agent links
- Full docs site: https://docs.logbrew.co
- OpenAPI: https://logbrew.co/openapi.json
- Docs: https://logbrew.co/en/docs
- Docs Markdown: https://logbrew.co/en/docs.md
- Agent guide: https://logbrew.co/en/agents
- Home Markdown: https://logbrew.co/en/page.md
- llms.txt: https://logbrew.co/llms.txt
- Sitemap: https://logbrew.co/sitemap.xml