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

# How BugByBug Works

> Learn how BugByBug work behind the scene

BugByBug works by continuously monitoring connected applications, collecting application telemetry, and using AI to help developers investigate errors and understand their root causes.

Once your application is connected, BugByBug receives telemetry through OpenTelemetry and makes the available application data useful for monitoring and investigation.

Here's how the process works.

## 1. Connect your application

Start by creating a project in BugByBug and connecting your application using OpenTelemetry.

OpenTelemetry provides a standardized way to instrument your application and export telemetry without relying on a proprietary BugByBug SDK.

You can connect your application in two ways:

* **Direct export:** Configure your application's OpenTelemetry instrumentation to send telemetry directly to BugByBug.
* **OpenTelemetry Collector:** Route telemetry through an OpenTelemetry Collector before exporting it to BugByBug. This is useful when you want a centralized way to collect, process, and export telemetry from multiple services.

Once configured, your application can start sending supported telemetry to BugByBug.

## 2. Capture application data

After your application is connected, BugByBug continuously receives and monitors the telemetry it sends.

This data provides visibility into what's happening inside your application, including:

* **Errors:** Exceptions and application failures that need investigation.
* **Traces:** Information about requests and operations as they move through your application and services.
* **Logs:** Records of events and activities occurring within your application.
* **Metrics:** Measurements that help you understand application behavior and performance.

BugByBug can also use available context such as stack traces, requests, events, breadcrumbs, and environment information to provide a clearer picture of an error.

The more relevant context your application provides, the more useful the investigation can be.

## 3. Investigate errors with AI

When an error is detected, BugByBug helps you move beyond the error message and investigate what caused it.

Its AI-powered investigation analyzes the available evidence to help:

* Understand the conditions surrounding the error.
* Identify likely root causes and contributing factors.
* Recognize relevant patterns and dependencies.
* Connect the error to relevant parts of your application.

Rather than leaving you with another stack trace to interpret, BugByBug helps organize the available evidence into a more understandable investigation.

## 4. Find relevant code and recommendations

Understanding the root cause is important, but knowing where to make a change is just as valuable.

By connecting your code repository, BugByBug can surface relevant files and stack frames associated with an issue.

It can then provide structured recommendations and suggested code changes to help you understand how the issue might be resolved.

These recommendations are intended to support your debugging workflow, not replace engineering judgment.

## 5. Review and resolve

BugByBug brings the investigation findings together so you can review the error, understand the likely cause, and decide what to do next.

Your team remains in control of the resolution process:

1. Review the error and its investigation findings.
2. Examine the identified root cause and relevant code.
3. Evaluate the recommended changes.
4. Test and verify the proposed solution.
5. Apply the fix when you're confident in the result.

BugByBug helps shorten the distance between detecting an error and resolving it, while keeping developers in control of their code.

## The complete workflow

The process can be summarized in five steps:

1. **Connect:** Instrument your application with OpenTelemetry and send telemetry to BugByBug.
2. **Capture:** Continuously receive and monitor application telemetry.
3. **Investigate:** Use AI to analyze available evidence and identify likely causes.
4. **Recommend:** Surface relevant code and actionable recommendations.
5. **Resolve:** Review, test, and apply the changes needed to fix the issue.

## What's next?

Ready to connect your application?

Head over to the [Get Started](get-started.mdx) guide to create your first project, configure OpenTelemetry, and send your first telemetry data to BugByBug.

**Next:** OpenTelemetry and BugByBug →


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