Skip to content

docs: Add guide for creating OTel Input Packages#17396

Merged
strawgate merged 7 commits intomainfrom
claude/issue-17381-20260211-1801
Feb 12, 2026
Merged

docs: Add guide for creating OTel Input Packages#17396
strawgate merged 7 commits intomainfrom
claude/issue-17381-20260211-1801

Conversation

@strawgate
Copy link
Contributor

Summary

Add comprehensive documentation for developing OpenTelemetry Input Packages.

Changes

  • New guide at docs/extend/otel-input-packages.md covering package structure, manifest configuration, template development, testing, and submission requirements
  • Updated docs/extend/index.md to link to the new guide
  • Updated docs/extend/integration-definitions.md to reference OTel Input Packages

Closes #17381

Generated with Claude Code

Add comprehensive documentation for developing OpenTelemetry Input
Packages, including:
- Package structure and manifest configuration
- Handlebars template development patterns
- Variable types and configuration options
- Testing requirements (policy and system tests)
- Documentation guidelines and submission checklist
- Links to existing examples (statsd, prometheus, hostmetrics)

Also update index.md and integration-definitions.md to reference
the new guide.

Closes #17381

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
@strawgate strawgate requested a review from a team as a code owner February 12, 2026 13:45
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Vale Linting Results

Summary: 3 suggestions found

💡 Suggestions (3)
File Line Rule Message
docs/extend/otel-input-packages.md 257 Elastic.WordChoice Consider using 'refer to (if it's a document), view (if it's a UI element)' instead of 'see', unless the term is in the UI.
docs/extend/otel-input-packages.md 283 Elastic.WordChoice Consider using 'refer to (if it's a document), view (if it's a UI element)' instead of 'see', unless the term is in the UI.
docs/extend/otel-input-packages.md 342 Elastic.WordChoice Consider using 'efficient, basic' instead of 'Simple', unless the term is in the UI.

The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

@strawgate
Copy link
Contributor Author

@claude can you address PR feedback please

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The documentation is well-structured and comprehensive. However, the CI docs-build is failing because otel-input-packages.md is not registered in docs/extend/toc.yml. The file must be added to the table of contents for the documentation build to succeed.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@strawgate
Copy link
Contributor Author

strawgate commented Feb 12, 2026

Exception: Uncaught exception while processing file
System.InvalidOperationException: Could not find OTel Input Packages in navigation
   at Elastic.Documentation.Navigation.INavigationTraversable.GetNavigationFor(IDocumentationFile) + 0x87
   at Elastic.Markdown.HtmlWriter.<RenderLayout>d__23.MoveNext() + 0x16a5
--- End of stack trace from previous location ---
   at Elastic.Markdown.HtmlWriter.<WriteAsync>d__25.MoveNext() + 0xc5
--- End of stack trace from previous location ---
   at Elastic.Markdown.Exporters.DocumentationFileExporter.<ProcessFile>d__3.MoveNext() + 0x5c
--- End of stack trace from previous location ---
   at Elastic.Markdown.DocumentationGenerator.<ProcessFile>d__31.MoveNext() + 0x29b
--- End of stack trace from previous location ---
   at Elastic.Markdown.DocumentationGenerator.<>c__DisplayClass25_0.<<ProcessDocumentationFiles>b__0>d.MoveNext() + 0x8f
NOTE: extend/otel-input-packages.md

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Claude finished @strawgate's task in 1m 19s —— View job


Addressing PR Feedback

  • Gather context and understand all review feedback
  • Fix toc.yml - add missing entry for otel-input-packages.md
  • Simplify "When to Use" section (line 18) - OTel for Receivers, traditional for Beats
  • Add reference to example packages or search pattern (line 338)
  • Note the dataset matching bug in sample files (line 280)
  • Add elastic-package format command mention (line 334)
  • Commit and push changes

All review feedback has been addressed in commit cb1ef46:

  1. toc.yml: Added otel-input-packages.md entry after what-is-an-integration.md section to fix the docs build failure
  2. When to Create section: Simplified to one sentence: "Use OTel Input Packages for OpenTelemetry Collector receivers. Use traditional integrations for Beats-based data collection."
  3. Examples section: Added search hint: "or search for packages containing _input_otel in the packages directory"
  4. System tests section: Added note about the known dataset matching bug
  5. Submission checklist: Added elastic-package format as a checklist item

--- |


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

… add notes

- Add otel-input-packages.md to toc.yml to fix docs build
- Simplify 'When to Create' section: OTel for Receivers, Beats for traditional
- Add note about dataset matching bug in sample files
- Add elastic-package format to submission checklist
- Add search hint for example packages

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
@strawgate
Copy link
Contributor Author

@claude there's still some open feedback, i think it's been addressed, if so can you resolve it?

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Documentation looks accurate and comprehensive. All existing feedback from has been addressed in the latest commit (cb1ef46), including the toc.yml entry. The docs-build CI needs to re-run on the latest commit to verify the fix.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Claude finished @strawgate's task in 1m 33s —— View job


Checking Open Review Feedback

  • Gather context and check open review threads
  • Verify each feedback item has been addressed
  • Resolve addressed threads

All 5 review threads have been verified as addressed in commit cb1ef46 and resolved:

  1. Simplified "When to Create" section - Now one sentence: OTel for Receivers, traditional for Beats
  2. Added search pattern reference - "or search for packages containing _input_otel"
  3. Dataset matching bug note - Added note about known bug in System Tests section
  4. elastic-package format - Added to submission checklist
  5. toc.yml entry - Added otel-input-packages.md to table of contents

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@strawgate
Copy link
Contributor Author

@claude is there any information in this guide that exists elsewhere in the docs that we should just be pointing to?

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Claude finished @strawgate's task in 1m 5s —— View job


Checking for Documentation Overlap

  • Gather context and understand the repository
  • Read the new OTel Input Packages guide
  • Review existing documentation in the extend directory
  • Identify any overlapping content that should be cross-referenced
  • Provide recommendations

After comparing the OTel Input Packages guide against existing documentation, here's my analysis:

Overlapping Content That Should Be Cross-Referenced

1. Testing Documentation (Policy & System Tests)
The guide includes detailed testing sections that overlap with existing docs:

  • Policy Tests (lines 224-249): Already covered in policy-testing.md - the new guide does link to this but also duplicates content (example YAML, running commands)
  • System Tests (lines 251-279): Already covered in system-testing.md - the new guide duplicates content (required files, running commands, --generate flag)

Recommendation: The testing sections could be significantly condensed to just:

  • Explain OTel-specific differences (e.g., the known dataset matching bug)
  • Link to the main testing docs for detailed instructions

2. Variable Types Table (lines 88-100)
The variable types (text, password, bool, duration, select, yaml) are part of the package spec. While this info isn't directly duplicated elsewhere, it's partially covered by the manifest-spec.md.

Status: This is acceptable since it's OTel-focused and compact. No change needed.

3. Package Structure
The general package structure concepts align with what's in integration-definitions.md and build-create-package.md, but the OTel guide is specific enough (showing _input_otel suffix, agent/input/ structure) that it's not duplicative.

Status: No change needed - the structure is OTel-specific.

4. Documentation Section (lines 281-308)
The documentation section has some overlap with documentation-guidelines.md, which defines standard sections for integration docs.

Recommendation: Could simplify to say "Follow documentation guidelines with these OTel-specific additions..." and then just list OTel-specific items like linking to upstream OTel receiver docs.

Content That's Unique and Well-Placed

These sections are appropriately OTel-specific:

  • When to Create (differentiating OTel vs traditional integrations)
  • Manifest Configuration with input: otelcol and OTel-specific categories
  • Template Development (input.yml.hbs Handlebars patterns for OTel config)
  • Resource Detection Processor
  • Package Icon guidance for combined product/OTel logos
  • Submission Checklist with OTel-specific items

Summary

Section Recommendation
Policy Tests Condense - link to policy-testing.md, keep only OTel-specific notes
System Tests Condense - link to system-testing.md, keep only OTel-specific notes (dataset bug)
Documentation Optional - could link to documentation-guidelines.md for basics
Others Keep as-is - appropriately OTel-specific

Would you like me to make these changes to reduce duplication?



Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@strawgate
Copy link
Contributor Author

@claude let's link to the relevant docs where we can! Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Claude finished @strawgate's task in 2m 29s —— View job


Linking to Relevant Docs

  • Gather context and understand the repository
  • Read existing documentation files for cross-referencing
  • Identify sections that can link to existing docs
  • Update the guide with cross-references
  • Commit and push changes

Done! Added cross-references to existing documentation throughout the OTel Input Packages guide (commit c7e9ca6):

Links added:

Also addressed:

  • Applied jlind23's suggestion to add the bug link for the dataset matching issue
  • Removed duplicated "running commands" sections (these are now in the linked docs)
    |

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

- Link to integration-definitions.md for input package concepts
- Link to manifest-spec.md for complete manifest specification
- Link to testing.md overview and individual policy/system testing guides
- Link to documentation-guidelines.md for doc standards
- Apply jlind23's suggestion to add bug link for dataset matching issue
- Remove duplicated running commands (now in linked docs)
- Reorganize Additional Resources into internal and external sections

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
@strawgate
Copy link
Contributor Author

@claude let's come up with a quick step by step guide for writing the input template and the manifest variables. Basically find the receiver documentation upstream https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver look at the configuration options, identify relevant ones that we want to be configurable, add inputs for those, create the template based on the configuration, review the readme to understand the major components that should be mentioned in the readme, etc.

Go ahead and review our input package PRs and then go review the upstream receivers and come up with a quick todo list we can add to the doc that will help ensure these are always done right :)

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Claude finished @strawgate's task in 3m 7s —— View job


Creating Step-by-Step Guide for OTel Input Package Development

  • Gather context and understand the repository
  • Review existing OTel input package PRs in this repository
  • Examine upstream OTel receiver documentation patterns
  • Analyze what makes a good input template and manifest configuration
  • Draft step-by-step workflow guide
  • Add the guide to the documentation
  • Commit and push changes

Done! Added a comprehensive Development Workflow section (commit 2ddd966) with 6 steps based on reviewing existing OTel input package PRs (#17303, #17226, #15739) and upstream OTel receiver documentation patterns.

New section includes:

  1. Step 1: Research the Upstream Receiver - How to find and understand OTel receiver docs (README.md, config.go, metric docs)

  2. Step 2: Identify Configurable Variables - Mapping upstream Go types to package variable types, deciding what to expose with show_user: true/false

  3. Step 3: Create the Input Template - Building the Handlebars template, handling conditionals, booleans, and resource detection

  4. Step 4: Write the Documentation - What sections to include in README.md, linking to upstream docs instead of duplicating

  5. Step 5: Test the Package - Policy test scenarios, system test setup, handling platform-specific receivers

  6. Step 6: Finalize and Submit - Pre-submission steps including formatting, CODEOWNERS, icons, and validation

The guide also includes a type mapping table:

Upstream Go Type Package Variable Type Notes
string text For endpoints, paths, names
string (secret) password For credentials
bool bool For feature toggles
time.Duration duration For intervals like 60s, 5m
[]string text with multi: true For lists of values
Complex structs yaml For advanced nested configuration
Enum/limited values select For protocol choices, modes

--- |


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Adds a comprehensive Development Workflow section with 6 steps:
1. Research the Upstream Receiver - how to find and understand OTel receiver docs
2. Identify Configurable Variables - mapping upstream types to package variables
3. Create the Input Template - building the Handlebars template
4. Write the Documentation - what to include in README.md
5. Test the Package - policy and system test guidance
6. Finalize and Submit - pre-submission checklist

This helps ensure consistent, high-quality packages that align with existing patterns.

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
@strawgate
Copy link
Contributor Author

@claude Let's keep the step by step instructions you just added a bit more concise and not reproduce what's in other places (feel free to point to other docs, etc).

Let's do a dry run of the steps and make sure they get you to a successful outcome when trying it for a sample receiver / input package.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Claude finished @strawgate's task in 3m 6s —— View job


Condensing Step-by-Step Guide and Validating with Dry Run

  • Read the current Development Workflow section
  • Choose a sample OTel receiver for dry run validation
  • Walk through the steps to validate they work
  • Condense the guide to be more concise, linking to existing docs
  • Update the documentation
  • Commit and push changes

Summary:

Condensed the Development Workflow section from ~110 lines to ~48 lines (commit b81cd61):

Before After
6 detailed steps with numbered sub-items 6 concise steps with bullet points
Duplicated testing info Links to policy-testing.md & system-testing.md
Duplicated docs guidelines Links to documentation-guidelines.md
Verbose explanations Quick reference table for type mapping

Dry run validation with InfluxDB receiver confirmed the condensed workflow provides sufficient guidance:

  1. ✓ Research → Found receiver at receiver/influxdbreceiver/, identified endpoint config
  2. ✓ Variables → Would map to text type based on table
  3. ✓ Template → Clear patterns in Template Development section
  4. ✓ Documentation → Links to guidelines doc
  5. ✓ Tests → Links to detailed testing docs
  6. ✓ Finalize → Commands listed, checklist referenced

Also fixed Vale linter suggestions: seerefer to, SimpleBasic

--- |


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

- Reduce workflow from ~110 lines to ~48 lines
- Link to existing docs (policy-testing.md, system-testing.md, documentation-guidelines.md) instead of duplicating content
- Keep type mapping table as quick reference
- Fix Vale linter suggestions: 'see' → 'refer to', 'Simple' → 'Basic'
- Validated workflow with InfluxDB receiver dry run

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Feb 12, 2026
Comment on lines +241 to +247
Always include the `resourcedetection` processor for host enrichment:

```handlebars
processors:
resourcedetection/system:
detectors: ["system"]
```
Copy link
Collaborator

@mrodm mrodm Feb 12, 2026

Choose a reason for hiding this comment

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

Should this processor be added always ?
If a receiver is collecting metrics from an endpoint, that maybe is not in the same host, should this be added ? It would be adding attributes from the elastic-agent host, is my understanding correct ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hopefully we have a more general way to handle this soon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we're going to just do system for now and solve this more generally in fleet

@strawgate
Copy link
Contributor Author

@claude please address PR feedback, let's leave the instruction for resource detection for now

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Claude finished @strawgate's task in 1m 27s —— View job


Addressing PR Feedback

  • Gather context and understand all review feedback
  • Address mrodm's feedback on sample_event.json generation (line 331)
  • Address mrodm's feedback on icon examples (line 348)
  • Commit and push changes

All review feedback addressed in commit 5c01e00:

  1. Package Icon section: Added links to existing icons as examples:

    • hostmetrics_input_otel/img/system-otel.svg
    • iis_input_otel/img/iis_otellogo.svg
  2. Submission Checklist: Added checklist item for generating sample_event.json from system tests using elastic-package test system --generate

Note: Left the resource detection processor instruction as-is per request.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

…t item

- Add links to existing OTel package icons as examples (hostmetrics, iis)
- Add checklist item for generating sample_event.json from system tests

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
@strawgate strawgate merged commit b7eb7cc into main Feb 12, 2026
4 checks passed
@strawgate strawgate deleted the claude/issue-17381-20260211-1801 branch February 12, 2026 19:52
jakubgalecki0 pushed a commit to jakubgalecki0/integrations that referenced this pull request Feb 19, 2026
* docs: Add guide for creating OTel Input Packages

Add comprehensive documentation for developing OpenTelemetry Input
Packages, including:
- Package structure and manifest configuration
- Handlebars template development patterns
- Variable types and configuration options
- Testing requirements (policy and system tests)
- Documentation guidelines and submission checklist
- Links to existing examples (statsd, prometheus, hostmetrics)

Also update index.md and integration-definitions.md to reference
the new guide.

Closes elastic#17381

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>

* Address PR feedback: add toc.yml entry, simplify when-to-use section, add notes

- Add otel-input-packages.md to toc.yml to fix docs build
- Simplify 'When to Create' section: OTel for Receivers, Beats for traditional
- Add note about dataset matching bug in sample files
- Add elastic-package format to submission checklist
- Add search hint for example packages

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>

* Add cross-references to existing documentation

- Link to integration-definitions.md for input package concepts
- Link to manifest-spec.md for complete manifest specification
- Link to testing.md overview and individual policy/system testing guides
- Link to documentation-guidelines.md for doc standards
- Apply jlind23's suggestion to add bug link for dataset matching issue
- Remove duplicated running commands (now in linked docs)
- Reorganize Additional Resources into internal and external sections

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>

* Add step-by-step development workflow guide for OTel Input Packages

Adds a comprehensive Development Workflow section with 6 steps:
1. Research the Upstream Receiver - how to find and understand OTel receiver docs
2. Identify Configurable Variables - mapping upstream types to package variables
3. Create the Input Template - building the Handlebars template
4. Write the Documentation - what to include in README.md
5. Test the Package - policy and system test guidance
6. Finalize and Submit - pre-submission checklist

This helps ensure consistent, high-quality packages that align with existing patterns.

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>

* Condense Development Workflow section for conciseness

- Reduce workflow from ~110 lines to ~48 lines
- Link to existing docs (policy-testing.md, system-testing.md, documentation-guidelines.md) instead of duplicating content
- Keep type mapping table as quick reference
- Fix Vale linter suggestions: 'see' → 'refer to', 'Simple' → 'Basic'
- Validated workflow with InfluxDB receiver dry run

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>

* Address PR feedback: add icon examples and sample_event.json checklist item

- Add links to existing OTel package icons as examples (hostmetrics, iis)
- Add checklist item for generating sample_event.json from system tests

Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a doc/guide for creating OTel Input Packages

4 participants