<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/only-include-resource-detectors-you-need-by-building-your-own-collector-ud8b055me" -->

---
title: Only include resource detectors you need by building...
description: The OpenTelemetry Collector Builder (ocb) now lets you exclude unused resource detectors at compile time instead of bundling all of them by default. Each...
canonical: https://daily.dev/posts/only-include-resource-detectors-you-need-by-building-your-own-collector-ud8b055me
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Only include resource detectors you need by building your own Collector | daily.dev
og:description: The OpenTelemetry Collector Builder (ocb) now lets you exclude unused resource detectors at compile time instead of bundling all of them by default. Each...
og:url: https://daily.dev/posts/only-include-resource-detectors-you-need-by-building-your-own-collector-ud8b055me
og:image: https://api.daily.dev/og/posts/ud8b055Me.png
og:image:alt: Only include resource detectors you need by building your own Collector
og:image:width: 1200
og:image:height: 630
og:locale: en
---

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

# Only include resource detectors you need by building your own Collector

**[OpenTelemetry](https://daily.dev/sources/opentelemetry)** · 5 min read · 0 upvotes · 0 comments

## Summary

The OpenTelemetry Collector Builder (ocb) now lets you exclude unused resource detectors at compile time instead of bundling all of them by default. Each detector can be disabled with an omit_ build tag, or filtered using a new resource.detection.detectors config block introduced in ocb v0.163.1. Testing this against the otelcol-k8s distribution cut the binary from 182MB to 147MB, a 20% reduction, and removed 13 dependency packages. The feature relies on recent updates to the otelconf package and the resource detection processor.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://opentelemetry.io/blog/2026/collector-with-less-dependencies>

## Questions this post answers

### How do I exclude unused resource detectors when building a custom OpenTelemetry Collector with ocb?

Use the omit_ build tags or the new resource.detection.detectors config block in the ocb manifest, available since Collector and ocb v0.163.1. Each detector has an omit_ flag, such as omit_detector_system, or you can list only the detectors you want under a resource block, and ocb compiles out the rest at build time.

_daily.dev surfaces OpenTelemetry Collector updates for teams optimizing their observability stack's footprint._

### How much smaller does an OpenTelemetry Collector binary get after removing unused resource detectors?

The otelcol-k8s distribution binary shrank from 182MB to 147MB, about a 20% reduction, after filtering out unneeded resource detectors. The dependency list also shrank by 13 packages, including cloud-provider specific detectors like AWS Elastic Beanstalk, Azure App Service, Hetzner, and DigitalOcean metadata libraries.

_daily.dev tracks dependency and binary-size improvements for engineers tuning production observability builds._

## Similar posts on daily.dev

- [OpenTelemetry Collector distributions compared: Core, Contrib, OCB, and vendor builds. Which one should you use?](https://daily.dev/posts/opentelemetry-collector-distributions-compared-core-contrib-ocb-and-vendor-builds-which-one-sho-oae13fu2p) · Dynatrace · 0 upvotes · 0 comments
- [How to OTel: A blueprint for OpenTelemetry adoption](https://daily.dev/posts/how-to-otel-a-blueprint-for-opentelemetry-adoption-fbrceulsq) · elastic · 1 upvotes · 0 comments
- [Use OpenTelemetry with Observability Pipelines for vendor-neutral log collection and cost control](https://daily.dev/posts/use-opentelemetry-with-observability-pipelines-for-vendor-neutral-log-collection-and-cost-control-3av2frw5s) · Datadog · 1 upvotes · 0 comments
- [Inside Adobe's OpenTelemetry pipeline: simplicity at scale](https://daily.dev/posts/inside-adobe-s-opentelemetry-pipeline-simplicity-at-scale-xbmirj76w) · OpenTelemetry · 7 upvotes · 0 comments
- [Filtering and reducing AI agent telemetry with the OpenTelemetry Collector](https://daily.dev/posts/filtering-and-reducing-ai-agent-telemetry-with-the-opentelemetry-collector-cnhecn7ui) · CNCF · 2 upvotes · 1 comments

---

Tags: [#golang](https://daily.dev/tags/golang), [#observability](https://daily.dev/tags/observability), [#opentelemetry](https://daily.dev/tags/opentelemetry)

[View this post on daily.dev](https://daily.dev/posts/only-include-resource-detectors-you-need-by-building-your-own-collector-ud8b055me)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Only include resource detectors you need by building your own Collector","url":"https://daily.dev/posts/only-include-resource-detectors-you-need-by-building-your-own-collector-ud8b055me","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/only-include-resource-detectors-you-need-by-building-your-own-collector-ud8b055me"},"datePublished":"2026-10-29T15:46:38.031Z","dateModified":"2026-10-29T15:49:04.808Z","description":"The OpenTelemetry Collector Builder (ocb) now lets you exclude unused resource detectors at compile time instead of bundling all of them by default. Each...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/98d24ffd1665dd1b58f33da16e02e5b6?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/98d24ffd1665dd1b58f33da16e02e5b6?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"OpenTelemetry","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"OpenTelemetry","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/058cf331ff204b6aa421b376d509f16e","url":"https://daily.dev/sources/opentelemetry"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/only-include-resource-detectors-you-need-by-building-your-own-collector-ud8b055me","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"golang,observability,opentelemetry","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"OpenTelemetry","item":"https://daily.dev/sources/opentelemetry"},{"@type":"ListItem","position":3,"name":"Only include resource detectors you need by building your own Collector"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/only-include-resource-detectors-you-need-by-building-your-own-collector-ud8b055me#faq","mainEntity":[{"@type":"Question","name":"How do I exclude unused resource detectors when building a custom OpenTelemetry Collector with ocb?","acceptedAnswer":{"@type":"Answer","text":"Use the omit_ build tags or the new resource.detection.detectors config block in the ocb manifest, available since Collector and ocb v0.163.1. Each detector has an omit_ flag, such as omit_detector_system, or you can list only the detectors you want under a resource block, and ocb compiles out the rest at build time. daily.dev surfaces OpenTelemetry Collector updates for teams optimizing their observability stack's footprint."}},{"@type":"Question","name":"How much smaller does an OpenTelemetry Collector binary get after removing unused resource detectors?","acceptedAnswer":{"@type":"Answer","text":"The otelcol-k8s distribution binary shrank from 182MB to 147MB, about a 20% reduction, after filtering out unneeded resource detectors. The dependency list also shrank by 13 packages, including cloud-provider specific detectors like AWS Elastic Beanstalk, Azure App Service, Hetzner, and DigitalOcean metadata libraries. daily.dev tracks dependency and binary-size improvements for engineers tuning production observability builds."}}]}
```

