# The package in your code

> Installed in your project, the package finds the database, Redis, queues, and scheduled tasks, then monitors them from inside the app. Your app doesn’t need a public address.

- Section: Monitor your apps
- Availability: From the Free plan. Logs with Pro and Team. On iPhone, iPad, Mac and Android.
- URL: https://pulse-app.si/en/docs/apps/package

## Connect an app

### iPhone and iPad

1. Tap **Add**, then **Get the Key** on the **Install the Package** page.
2. Enter an **App Name**. The **Address to test** is optional.
3. Tap **Continue**, then choose the project’s language.
4. Follow the steps shown, or tap **Send to Developer**.
5. Restart your app. The screen leaves **Waiting for First Heartbeat** and shows what the package found.

### Mac

1. Click **Add**, then choose **Install the Package**.
2. Enter a **Name**. The **Address to test** is optional.
3. Click **Get the Key**, then choose the project’s language.
4. Follow the steps shown, or click **Send to Developer**.
5. Restart your app. The window leaves **Waiting for First Heartbeat** and shows what the package found.

### Android

1. Tap **Add**, then **Get the Key** on the **Install the Package** page.
2. Enter an **App Name**. The **Address to test** is optional.
3. Tap **Continue**, then choose the project’s language.
4. Follow the steps shown, or tap **Send to Developer**.
5. Restart your app. The screen leaves **Waiting for First Heartbeat** and shows what the package found.

## Install it in the project

The app shows these commands with your real key. The key appears in full only once. Don’t commit it.

### Node.js

For NestJS and Next.js, at the project root. The command installs the package, adds the key to `.env` and wires up the module.

**zsh**

```bash
npx @pulse-si/init pk_live_…
```

See [NestJS](https://pulse-app.si/en/docs/packages/nest), [Next.js](https://pulse-app.si/en/docs/packages/next) and [npx @pulse-si/init](https://pulse-app.si/en/docs/packages/init).

### Laravel

PHP requests are short-lived, so a small worker runs beside the app and talks to Pulse for it. Without the worker, no reports go out.

**zsh**

```bash
composer require pulse-si/laravel
echo "PULSE_KEY=pk_live_…" >> .env
php artisan pulse-app:work
```

See [Laravel](https://pulse-app.si/en/docs/packages/laravel).

### Symfony

As with Laravel, a worker runs beside the app, like `messenger:consume`.

**zsh**

```bash
composer require pulse-si/symfony
echo "PULSE_KEY=pk_live_…" >> .env.local
bin/console pulse:work
```

See [Symfony](https://pulse-app.si/en/docs/packages/symfony).

### Python

Python 3.9 or later, with no other dependency. Put `PULSE_KEY` in the process environment, then wire up Pulse. With Django, add this line to `settings.py`:

**settings.py**

```python
INSTALLED_APPS += ["pulse_python.django"]
```

Install the package with `pip install pulse-python`. With FastAPI, use `instrument(app)`; with Flask, `Pulse(app)`; elsewhere, `start_pulse()`. See [Python](https://pulse-app.si/en/docs/packages/python).

### Go

Put `PULSE_KEY` in the process environment, add the module with `go get pulse-app.si/go@latest`, then start Pulse at the top of `main`:

**main.go**

```go
defer pulse.Start(pulse.Options{Watch: []any{db, cache}}).Stop()
```

See [Go](https://pulse-app.si/en/docs/packages/go).

## What the package monitors

| What it finds | What it does |
| --- | --- |
| Database | `SELECT 1`, or `ping` for MongoDB |
| Redis | `PING` |
| Job queues | Reads the number of waiting jobs |
| Scheduled tasks | Records their schedule, their last run and the next one |

What gets detected depends on the framework, and each [framework page](https://pulse-app.si/en/docs/packages/overview) has the exact list. Every check is read-only and has 5 seconds to respond. The package never throws, so your app keeps running if Pulse is unreachable.

## What triggers an alert

| What happens | What Pulse says |
| --- | --- |
| A dependency stops responding | “helio-api has an issue”, “Redis isn’t responding.” |
| A task misses its run by more than 5 minutes | “helio-api has an issue”, “The “invoice-reminders” job is late.” |
| A tracked task failed | “helio-api has an issue”, “The “invoice-reminders” job failed.” |
| The package stays silent for longer than the **Interval** plus 60 seconds of grace | “Cron late”, “helio-api · no heartbeat received on schedule.” |
| The **Address to test** fails past the threshold | “helio-api is down”, with the [exact cause](https://pulse-app.si/en/docs/apps/url#alert). |

> **The address to test**
>
> This optional address adds the response time and a view from outside. Pulse calls it at every interval, on top of the package reports. You can add, change, or remove it in **App Settings › Tested address**.

## Report frequency

The package follows the app’s **Interval**: one minute by default with Pro and Team, 5 minutes with Free. With Pro and Team, while you have the app open in Pulse, the state goes out every 5 seconds and the [logs](https://pulse-app.si/en/docs/apps/logs) every second.

## Choosing what gets sent

The heartbeat always goes out. The rest is set with `PULSE_SEND`, `PULSE_INCLUDE`, `PULSE_EXCLUDE` and `PULSE_LOG_LEVEL`. No business data is sent, including queries and environment variables, and secrets are masked before sending.

- [All variables](https://pulse-app.si/en/docs/packages/variables): Every setting and its default value.
- [Exactly what is sent](https://pulse-app.si/en/docs/packages/payload): The exact contents of a report.
- [No signal received](https://pulse-app.si/en/docs/help/no-signal): The package’s messages and what to do.
