Skip to content

Conversation

@shubhkr72
Copy link

@shubhkr72 shubhkr72 commented Nov 15, 2025

Description

This PR addresses issue #8361 by copy editing the "Building a custom Collector" page to ensure style guide compliance and improve clarity.

Changes made:

  • Applied sentence case to all subheadings
  • Converted Markdown note/tip blocks to Hugo alert shortcodes ({{% alert %}})
  • Fixed capitalization: "Collector" when referring to OTel Collector, lowercase in technical contexts
  • Changed future tense to present tense throughout (e.g., "you will be adding" → "you add")
  • Removed unnecessary passive voice and wordiness
  • Added dynamic version shortcodes ({{% version-from-registry %}}) for better maintainability
  • Preserved all technical directives (prettier-ignore, cSpell)

What this improves:

The page now follows the repository's style guide consistently, reads more naturally with present tense instructions, and uses dynamic versioning to stay current with releases automatically.

Fixes #8361


Preview: https://deploy-preview-8420--opentelemetry.netlify.app/docs/collector/custom-collector/

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 15, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@otelbot-docs otelbot-docs bot requested review from a team and dmitryax and removed request for a team November 15, 2025 08:48
@otelbot-docs otelbot-docs bot requested a review from a team November 15, 2025 08:52
Signed-off-by: Shubham Kumar <[email protected]>
@shubhkr72 shubhkr72 force-pushed the fix/custom-collector branch from 873f7ec to 0bf970e Compare November 15, 2025 09:04
Signed-off-by: Shubham Kumar <[email protected]>
Signed-off-by: Shubham Kumar <[email protected]>
Signed-off-by: Shubham Kumar <[email protected]>
Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @shubhkr72.

Drive-by question: why are you inlining {{% version-from-registry ... %}} directives? You wrote "added dynamic version shortcodes version-from-registry". Inlining doesn't seem dynamic to me :).

/cc @tiffany76

Copy link
Member

@tiffany76 tiffany76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @shubhkr72! Thanks for doing this copy edit! ✨

This page needs more work than some, so you'll see that I've taken your edits a bit further. This is a partial first pass review. I'll come back to review further as soon as I can. Thanks again!

The OpenTelemetry Community developed a tool called [OpenTelemetry Collector
builder][ocb] (or `ocb` for short) to assist people in assembling their own
distribution, making it easy to build a distribution that includes their custom
components along with components that are publicly available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's shorten this paragraph a little.

You can use the [OpenTelemetry Collector
Builder][ocb] (or ocb for short) to assemble your own
distribution that includes custom
components, upstream components, and other publicly available components.

## Step 1 - Install the builder

{{% alert color="primary" title="Note" %}}
{{% alert title="Note" %}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should pull this content out of an admonition and make a new section called ## Prerequisites that comes before the steps.

title: Building a custom collector
weight: 29
# prettier-ignore
cSpell:ignore: chipset darwin debugexporter gomod otlpexporter otlpreceiver wyrtw
Copy link
Member

@tiffany76 tiffany76 Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't leave a comment on the specific line, but can we change the title of the page to be "Build a custom Collector with OpenTelemetry Collector Builder" And the linkTitle can be "Build a custom Collector".

Comment on lines +37 to 39
Collector [releases with `cmd/builder` tags](https://github.com/open-telemetry/opentelemetry-collector-releases/tags). You can find a list of
assets named based on OS and chipset, so download the one that fits your
configuration:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the link reference rather than add the URL directly. It's true our docs are inconsistent with how we handle links, but in this case, there's no reason to change it. Also, I think the last sentence can be made a little clearer.

Suggested change
Collector [releases with `cmd/builder` tags](https://github.com/open-telemetry/opentelemetry-collector-releases/tags). You can find a list of
assets named based on OS and chipset, so download the one that fits your
configuration:
Collector [releases with `cmd/builder` tags][tags]. Find and download the asset that fits your operating system and chipset:

assets named based on OS and chipset, so download the one that fits your
configuration:

{{< tabpane text=true >}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @chalin that we should keep the tabbed pane section as it was, with variables for version numbers. We also don't need the bulleted list. Please revert the changes to the tabbed pane section, from line 42 to 88 in the original file. Thank you!

Comment on lines +122 to 124
As you can see in the table above, all the `dist` tags are optional. You add
custom values for them depending on whether you intend to make your
custom Collector distribution available for consumption by other users or if you
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As you can see in the table above, all the `dist` tags are optional. You add
custom values for them depending on whether you intend to make your
custom Collector distribution available for consumption by other users or if you
As you can see in the table above, all the `dist` tags are optional. You add
custom values for them depending on whether you intend to make your
custom Collector distribution available to other users or you

custom values for them depending on whether you intend to make your
custom Collector distribution available for consumption by other users or if you
are simply leveraging the `ocb` to bootstrap your component development and
are simply using the `ocb` to bootstrap your component development and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
are simply using the `ocb` to bootstrap your component development and
are using the `ocb` to bootstrap your component development and

testing environment.

For this tutorial, you will be creating a Collector's distribution to support
For this tutorial, you create a Collector's distribution to support
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For this tutorial, you create a Collector's distribution to support
In the following example, you create a Collector's distribution to support

For this tutorial, you create a Collector's distribution to support
the development and testing of components.

Go ahead and create a manifest file named `builder-config.yaml` with the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Go ahead and create a manifest file named `builder-config.yaml` with the
1. Create a manifest file named `builder-config.yaml` with the

Comment on lines +141 to +153
Now add the modules representing the components you want
incorporated in this custom Collector distribution. Take a look at the
[ocb configuration documentation](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder#configuration)
to understand the different modules and how to add the components.
We will be adding the following components to our development and testing
collector distribution:
Add the following components to the development and testing
Collector distribution:
- Exporters: OTLP and Debug
- Receivers: OTLP
- Processors: Batch
The `builder-config.yaml` manifest file will look like this after adding the
The `builder-config.yaml` manifest file looks like this after adding the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm condensing this section a bit, but the suggestion might not work. You might have to make the changes locally.

Suggested change
Now add the modules representing the components you want
incorporated in this custom Collector distribution. Take a look at the
[ocb configuration documentation](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder#configuration)
to understand the different modules and how to add the components.
We will be adding the following components to our development and testing
collector distribution:
Add the following components to the development and testing
Collector distribution:
- Exporters: OTLP and Debug
- Receivers: OTLP
- Processors: Batch
The `builder-config.yaml` manifest file will look like this after adding the
The `builder-config.yaml` manifest file looks like this after adding the
2. Add modules for the components you want
to include in your custom Collector distribution. See the
[ocb configuration documentation](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder#configuration)
to understand the different modules and how to add components.
For this example, add the following components:
- Exporters: OTLP and Debug
- Receivers: OTLP
- Processors: Batch
The `builder-config.yaml` manifest file looks like this after adding the components:

@tiffany76 tiffany76 added the sig:collector:refactor These issues are part of the Collector documentation refactoring project. label Nov 21, 2025
@tiffany76 tiffany76 added this to the otelcol-phase-1 milestone Nov 21, 2025
Copy link
Member

@tiffany76 tiffany76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay @shubhkr72, I've completed my first review. Let us know if you have any questions!

Comment on lines 187 to 189
[OpenTelemetry Registry](/ecosystem/registry/?language=collector). Note that
registry entries provide the full name and version you need to add to your
`builder-config.yaml`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[OpenTelemetry Registry](/ecosystem/registry/?language=collector). Note that
registry entries provide the full name and version you need to add to your
`builder-config.yaml`.
[OpenTelemetry Registry](/ecosystem/registry/?language=collector). Each
registry entry contains the full name and version you need to add to your
`builder-config.yaml`.


{{% /alert %}}

## Step 3a - Generate the code and build your Collector's distribution
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Step 3a - Generate the code and build your Collector's distribution
## Generate the code and build your Collector distribution

Comment on lines +197 to 200
This step builds your custom Collector distribution using the `ocb`
binary. If you would like to build and deploy your custom Collector distribution
to a container orchestrator (for example, Kubernetes), skip this step and go to
[Step 3b](#step-3b---containerize-your-collectors-distribution).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This step builds your custom Collector distribution using the `ocb`
binary. If you would like to build and deploy your custom Collector distribution
to a container orchestrator (for example, Kubernetes), skip this step and go to
[Step 3b](#step-3b---containerize-your-collectors-distribution).
This section instructs you to build your custom Collector distribution using the `ocb`
binary. If you would like to build and deploy your custom Collector distribution
to a container orchestrator, such as Kubernetes, skip this section and see
[Containerize your Collector Distribution](#step-3b---containerize-your-collector-distribution).

```

If everything went well, here is what the output of the command should look
If everything went well, here is what the output of the command looks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If everything went well, here is what the output of the command looks
The output of the command looks

```nocode
2022-06-13T14:25:03.037-0500 INFO internal/command.go:85 OpenTelemetry Collector distribution builder {"version": "{{% version-from-registry collector-builder noPrefix %}}", "date": "2023-01-03T15:05:37Z"}
```text
2022-06-13T14:25:03.037-0500 INFO internal/command.go:85 OpenTelemetry Collector distribution builder {"version": "0.139.0", "date": "2023-01-03T15:05:37Z"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's another spot where we need to maintain the variable.

COPY ./builder-config.yaml builder-config.yaml
RUN --mount=type=cache,target=/root/.cache/go-build GO111MODULE=on go install go.opentelemetry.io/collector/cmd/builder@{{% version-from-registry collector-builder %}}
RUN --mount=type=cache,target=/root/.cache/go-build GO111MODULE=on go install go.opentelemetry.io/collector/cmd/builder@v0.139.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the variable here.

```
<!-- prettier-ignore-end -->

The following is the minimalist `collector-config.yaml` definition:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following is the minimalist `collector-config.yaml` definition:
The following is a minimal `collector-config.yaml` definition:

# Test the newly-built image
docker run -it --rm -p 4317:4317 -p 4318:4318 \
--name otelcol <collector_distribution_image_name>:<version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On line 335 above, can you change OCB to ocb?

Comment on lines -361 to -363
[ocb]:
https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder
[tags]: https://github.com/open-telemetry/opentelemetry-collector-releases/tags
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep these link references.


The OpenTelemetry Community developed a tool called [OpenTelemetry Collector
builder][ocb] (or `ocb` for short) to assist people in assembling their own
distribution, making it easy to build a distribution that includes their custom
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the line above, can you capitalize Builder?

@tiffany76 tiffany76 moved this from Backlog to In review in SIG Comms + SIG Collector: Doc refactoring Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sig:collector:refactor These issues are part of the Collector documentation refactoring project. sig:collector

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[otelcol docs] Copy edit the Building a custom Collector page

3 participants