> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Instrument telemetry and manage monitors

> Configure Struct Agent to improve coverage and maintain useful monitoring.

You can instrument the application and create native monitors directly with the [observability guides](https://docs.struct.ai/observability/instrumentation.md). Use this page when you also need to configure Struct Agent to maintain monitoring as the code changes, including PR-driven Auto Monitors.

## Choose the workflow

For native telemetry monitors, use [Create a monitor](https://docs.struct.ai/observability/monitors/create.md). For PR-driven monitoring, configure **Auto Monitors**: it analyzes changes in the default GitHub repository and creates provider monitors after the configured deployment signal.

## Configure Auto Monitors

Connect [GitHub](https://docs.struct.ai/integrations/github.md), [Slack](https://docs.struct.ai/integrations/slack.md) and the [observability provider](https://docs.struct.ai/agent/observability-platforms.md). Check the provider's monitor-write permissions before enabling the job.

```bash theme={null}
struct github repos --json
struct automonitors settings get --json
struct automonitors channels list --json
struct github set-repo your-org/your-repo
struct automonitors settings set --environment production
struct automonitors channels add '#production-alerts' --default --description "Customer-facing production failures"
```

Replace the example repository and channel with approved values. The bot joins a public channel when configured; invite it to private channels first. Configure only the channels that should receive alerts.

## Connect the deployment signal

Choose one method:

```bash theme={null}
struct deploys setup github --environment production
# Or select a workflow whose success means this environment has deployed:
struct deploys workflows list --json
struct deploys setup workflow --workflow .github/workflows/deploy.yml --environment production
# Or have the deployment pipeline report completion through the Deployments API:
struct deploys setup webhook --environment production
```

GitHub Deployments requires deployment records and the app's deployment permission. A workflow maps to one environment; use the [Deployments API](https://docs.struct.ai/reference/deployments-api.md) when a workflow deploys several environments or the rollout finishes elsewhere. GitHub Deployments and webhook environment names must match exactly, including case.

```bash theme={null}
struct deploys show --json
struct automonitors enable --json
struct automonitors settings get --json
```

Inspect readiness and missing prerequisites. Enabling Auto Monitors does not backfill the repository; verify the next eligible PR and deployment through the workflow below.

## Pull requests and deployment

On an eligible new PR, Struct proposes monitors and reports missing instrumentation or provider access. Draft and bot PRs are skipped. Resolve instrumentation threads or deliberately skip the PR if branch protection requires resolved conversations.

Use the review's controls or `struct:skip` label to skip a PR. Re-enable through its review when appropriate. Skipping does not delete live monitors. Expected monitors remain drafts until deployment; delete unwanted drafts in the Struct app. These per-PR controls are not exposed by the CLI.

After deployment, inspect the actual provider monitors and updated PR review. A planned monitor is not proof of active coverage. Monitor creation depends on usable production telemetry and provider access.

## Maintain coverage

Ask Struct to revise a threshold, route results to another channel, pause coverage or retain context about an expected event. It maintains its own monitors; changes to monitors it did not create require your request. Verify the resulting configuration and provider state.

Use Auto Monitors settings in the app for author/path rules, instrumentation-gap comments and provider selection where the CLI does not expose a control. Ask for those specific choices rather than guessing them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.