> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/how-to-guides/collector-management/bring-your-own-collector/connect-opentelemetry-collectors-using-the-opamp-supervisor.md).

# Connect OpenTelemetry Collectors Using the OpAMP Supervisor

This guide walks through building a **custom OpenTelemetry Collector** with the [OpenTelemetry Collector Builder (OCB)](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder) that includes Bindplane components and running it under the [**OpAMP Supervisor**](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor) so it can be remotely managed by Bindplane.

This approach is ideal when you want to:

* Customize which receivers, processors, and exporters are compiled into your collector
* Retain centralized configuration and lifecycle management through Bindplane
* Experiment locally or deploy to VMs and bare-metal hosts

{% hint style="warning" %}
**NOTE**

This guide is intended as a starting point. For a more production-ready workflow outline that uses the [OpenTelemetry Distribution Builder](https://github.com/observIQ/otel-distro-builder) and Bindplane Collector Types, please refer to the detailed guides here:

* [Using an OpenTelemetry Distribution with Bindplane](/how-to-guides/collector-management/bring-your-own-collector/using-an-opentelemetry-distribution-with-bindplane.md)
* [Custom OpenTelemetry Collectors: Build, Run, and Manage at Scale](https://bindplane.com/blog/custom-opentelemetry-collectors-build-run-and-manage-at-scale)
* [BYOC - Feature Guide](/feature-guides/deployment-and-management/bring-your-own-collector.md)
  {% endhint %}

### Prerequisites and Version Alignment

Before building anything, ensure all components use the **same base OpenTelemetry Collector version**.

#### Choose a base version

1. Identify the OpenTelemetry Collector version that the [Dynatrace Bindplane OpenTelemetry Collector Contrib](https://github.com/dynatrace/dynatrace-bindplane-otel-contrib) (DBDOT Contrib) components target, listed on each release.
2. Use this version consistently across:
   * OpenTelemetry Collector Contrib
   * OpenTelemetry Collector Builder (OCB)
   * OpAMP Supervisor
   * All components referenced in your manifest

{% hint style="info" %}
**NOTE**

Some OpenTelemetry artifacts (such as OCB or the OpAMP Supervisor) may not be released for every collector version if no changes occurred. Always refer to the official[ OpenTelemetry Collector Releases](https://github.com/open-telemetry/opentelemetry-collector-releases/releases) for the correct versions.
{% endhint %}

### Download the OpenTelemetry Collector Builder (OCB)

The OpenTelemetry Collector Builder generates a custom collector binary from a manifest file.

#### Requirements

* [Go installed](https://go.dev/doc/install) on your system.

#### Download

* Download the OCB release that matches your chosen collector version from from the [OpenTelemetry Collector Releases](https://github.com/open-telemetry/opentelemetry-collector-releases/releases).

{% hint style="info" %}
NOTE

For more guidance view the [OCB documentation](https://opentelemetry.io/docs/collector/extend/ocb/).
{% endhint %}

### Create the Collector Manifest

Start with the standard OpenTelemetry Collector Contrib manifest and save it as `manifest.yaml`.

* Base Manifest: Use the [base `otelcol-contrib` manifest](https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/distributions/otelcol-contrib/manifest.yaml).

This file defines which components are compiled into your custom collector.

### Add Bindplane Components to the Manifest

Update `manifest.yaml` to include the Bindplane processors. These come from the [Dynatrace Bindplane OpenTelemetry Collector Contrib](https://github.com/dynatrace/dynatrace-bindplane-otel-contrib) (DBDOT Contrib) collection.

#### Processors

```yaml
processors:
  - gomod:
      github.com/dynatrace/dynatrace-bindplane-otel-contrib/processor/topologyprocessor v1.1.0
  - gomod:
      github.com/dynatrace/dynatrace-bindplane-otel-contrib/processor/throughputmeasurementprocessor v1.1.0
  - gomod:
      github.com/dynatrace/dynatrace-bindplane-otel-contrib/processor/snapshotprocessor v1.1.0
```

The `topologyprocessor` and `throughputmeasurementprocessor` are what enable Bindplane's data-flow features. Include the `topologyprocessor` even if you don't have a gateway use case today, so it's already there if you ever need one.

{% hint style="info" %}
**NOTE**

Older guides added a `bindplaneextension` here. That extension is deprecated and can be left out, as long as you include recent versions of the `topologyprocessor` and `throughputmeasurementprocessor` above.
{% endhint %}

Use the latest component versions from the [DBDOT Contrib releases page](https://github.com/dynatrace/dynatrace-bindplane-otel-contrib/releases), and make sure the rest of your manifest's OpenTelemetry components align with your selected collector version.

#### Distribution metadata

```yaml
dist:
  name: otelcol-contrib-bp
  description: OpenTelemetry Collector Contrib with Bindplane
  version: 0.1.0
  otelcol_version: 0.143.0
  output_path: ./_build
```

#### Complete manifest.yaml file sample

```yaml
processors:
  - gomod: github.com/dynatrace/dynatrace-bindplane-otel-contrib/processor/topologyprocessor v1.1.0
  - gomod: github.com/dynatrace/dynatrace-bindplane-otel-contrib/processor/throughputmeasurementprocessor v1.1.0
  - gomod: github.com/dynatrace/dynatrace-bindplane-otel-contrib/processor/snapshotprocessor v1.1.0
  # ... other processors

# Example for the 'dist' section:
dist:
  name: otelcol-contrib-bp
  description: OpenTelemetry Collector Contrib w/ Bindplane
  version: 0.1.0
  otelcol_version: 0.143.0
  output_path: ./_build
```

### Build the Custom Collector

Run OCB with your manifest:

```bash
./ocb --config manifest.yaml
```

This produces a custom collector binary. This example will produce `otelcol-contrib-bp` since that is the value of `dist.name` in the `manifest.yaml`.

### Download the OpAMP Supervisor

The OpAMP Supervisor is a standalone executable binary that manages the collector process and handles communication with Bindplane.

Download the OpAMP Supervisor binary that matches your collector version from the [OpenTelemetry Collector Releases](https://github.com/open-telemetry/opentelemetry-collector-releases/releases).

### Configure the OpAMP Supervisor

Create a file named `supervisor.yaml` to configure the connection to Bindplane.

* `server.endpoint`: Set the endpoint to the Bindplane OpAMP server.
* `server.headers.Authorization`: Set the Authorization header using your Bindplane Secret Key.
* `agent.executable`: Point the executable to the custom collector you built with OCB.

```yaml
server:
  endpoint: wss://app.bindplane.com/v1/opamp
  headers:
    Authorization: "Secret-Key <BINDPLANE_SECRET_KEY>"
  tls:
    insecure: false
    insecure_skip_verify: false

capabilities:
  accepts_remote_config: true
  reports_remote_config: true
  reports_available_components: true

agent:
  executable: ./otelcol-contrib-bp
  config_apply_timeout: 30s
  bootstrap_timeout: 5s

storage:
  directory: .
```

#### Optional: Enable local collector logging

To persist collector logs locally, reference an additional config file:

```yaml
agent:
  executable: ./otelcol-contrib-bp
  config_apply_timeout: 30s
  bootstrap_timeout: 5s
  config_files:
    - $OPAMP_EXTENSION_CONFIG
    - logging.yaml
    - $REMOTE_CONFIG
```

Create `logging.yaml`:

```yaml
service:
  telemetry:
    logs:
      level: info
      encoding: json
      disable_stacktrace: true
      sampling:
        enabled: false
      output_paths:
        - collector.log
      error_output_paths:
        - collector.log
```

### Run the Supervisor and Collector

Start the system by running the OpAMP Supervisor:

```bash
./opampsupervisor --config ./supervisor.yaml
```

The supervisor will:

* Launch your custom collector
* Register it with Bindplane
* Apply remote configuration updates automatically

Once connected, the collector appears in Bindplane and is fully managed through the platform.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bindplane.com/how-to-guides/collector-management/bring-your-own-collector/connect-opentelemetry-collectors-using-the-opamp-supervisor.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
