> ## 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.

# OpenTelemetry and BugByBug

> Learn how BugByBug and OpenTelemetry work together.

BugByBug uses **OpenTelemetry (OTel)** to receive application telemetry. Instead of requiring a separate BugByBug SDK for each language or framework, you can use OpenTelemetry's standard instrumentation and exporters to send data from your application to BugByBug.

This gives you a consistent way to connect different parts of your stack, including backend services, frontend applications, and distributed systems.

## Why OpenTelemetry?

[OpenTelemetry](https://opentelemetry.io/) is an open-source observability framework for generating, collecting, and exporting telemetry data from applications.

It provides a common standard for collecting information about how your software behaves, without tying your instrumentation to a particular monitoring vendor.

With OpenTelemetry, you can:

* Instrument applications using supported language libraries and integrations.
* Collect telemetry across different services and environments.
* Export telemetry to compatible observability platforms.
* Use a consistent approach across your technology stack.

Because BugByBug is built around OpenTelemetry, you can use the existing OTel ecosystem rather than learning and maintaining a separate monitoring SDK for every framework.

## How BugByBug uses OpenTelemetry

OpenTelemetry collects telemetry from your application and sends it to BugByBug for monitoring and investigation.

The general flow looks like this:

1. **Instrument your application.** Add OpenTelemetry instrumentation to generate telemetry from your application and its dependencies.
2. **Export telemetry.** Configure an OpenTelemetry exporter to send the data to BugByBug, either directly or through an OpenTelemetry Collector.
3. **Receive telemetry in BugByBug.** BugByBug receives the exported data and makes it available for monitoring and investigation.
4. **Investigate errors.** BugByBug uses the available telemetry and application context to help identify what went wrong and why.
5. **Review recommendations.** Use the investigation results, relevant code, and suggested changes to decide how to resolve the issue.

## What telemetry can you send?

OpenTelemetry supports several types of telemetry. BugByBug uses application telemetry to help build a clearer picture of errors and application behavior.

| Telemetry | What it tells you |
| - | - |
| **Traces** | How requests and operations move through your application and its services. |
| **Errors** | Exceptions and failures reported by your instrumentation. |
| **Logs** | Events and messages that help explain what happened during execution. |
| **Metrics** | Measurements that help show application behavior and performance over time. |

The information BugByBug can investigate depends on what your application is instrumented to collect and export. OpenTelemetry does not automatically capture every error or event without the appropriate instrumentation and configuration.

## Connecting OpenTelemetry to BugByBug

There are two common ways to send telemetry to BugByBug.

### Option 1: Export directly from your application

Your application uses an OpenTelemetry SDK and exporter to send telemetry directly to BugByBug.

This is a straightforward option for applications where you want to configure telemetry export within the application itself.

### Option 2: Use the OpenTelemetry Collector

The OpenTelemetry Collector sits between your application and BugByBug.

Your application sends telemetry to the Collector, which can receive, process, and export that data to BugByBug.

This approach is useful when you want a centralized place to manage telemetry from multiple applications or services.

Both approaches use OpenTelemetry standards. The right choice depends on your application's architecture and how you want to manage telemetry.

## BugByBug's OTLP connection details

BugByBug accepts telemetry through the OpenTelemetry Protocol (OTLP).

For the trace export configuration documented in this guide, use:

| Setting | Value |
| - | - |
| Endpoint | `https://nexus.bugbybug.com/v1/traces` |
| Protocol | OTLP/HTTP |
| Payload format | JSON (`application/json`) |
| Authentication | `x-api-key` request header |

Your project API key is used to authenticate the export request. Keep it secure and avoid exposing server-side credentials in client-side application code.

For browser applications, use a secure backend proxy or another approved browser-ingestion configuration. Do not place a private project or administrative key in a public frontend bundle.

See the integration guides for the exact configuration and code examples.

## What happens after you connect?

Once your application is configured and successfully exporting telemetry, BugByBug can use the received data to monitor your application and support error investigations.

When an error is reported, the available context helps BugByBug investigate the issue, identify likely causes, surface relevant code, and recommend possible next steps.

You remain in control of reviewing, testing, and applying any suggested changes.

## What's next?

* **Get Started:** Create a project and configure your BugByBug connection.
* **Integrations:** Follow the setup guide for your language, framework, or OpenTelemetry Collector.
* **Verify your connection:** Confirm that telemetry is reaching BugByBug.


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