Skip to content

Add kafka_input_otel package for Kafka receiver#17438

Open
mrodm wants to merge 57 commits intomainfrom
claude/issue-17139-20260216-1731
Open

Add kafka_input_otel package for Kafka receiver#17438
mrodm wants to merge 57 commits intomainfrom
claude/issue-17139-20260216-1731

Conversation

@mrodm
Copy link
Copy Markdown
Collaborator

@mrodm mrodm commented Feb 17, 2026

Proposed commit message

Create new OpenTelemetry input package for consuming telemetry data (logs, metrics, traces) from Kafka using the Kafka receiver.

Key features:

  • Multi-signal support with dynamic_signal_types: true
  • Signal-specific topics and encoding configuration (OTLP proto, OTLP JSON, and other formats)
  • SASL, Kerberos, and TLS authentication options
  • Consumer settings (offset, session timeout, heartbeat)
  • Metadata and auto-commit configuration
  • Header extraction support
  • Telemetry and error backoff configuration

Requires Kibana ^9.4.0 and format_version 3.6.0.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • Add system tests
  • Add policy tests
  • Manually tested the ingest of logs, metrics and traces
  • Update docs related to OTel input packages
  • Ensure that information related to traces are shown in APM in Kibana.

How to test this PR locally

# run the current latest 9.4.0-SNAPSHOT
elastic-package stack update -v --version 9.4.0-SNAPSHOT
elastic-package stack up -v -d --version 9.4.0-SNAPSHOT

cd packages/kafka_input_otel
elastic-package test system -v

elastic-package stack down -v

Related issues

Screenshots

tiles view Screenshot 2026-02-27 at 12 30 38 Screenshot 2026-02-27 at 12 29 06

Generated with Claude Code
Logo generated also with the assistance of Cursor.

Create new OpenTelemetry input package for consuming telemetry data
(logs, metrics, traces) from Kafka using the Kafka receiver.

Key features:
- Multi-signal support with dynamic_signal_types: true
- Signal-specific topics and encoding configuration
- SASL, Kerberos, and TLS authentication options
- Consumer settings (offset, session timeout, heartbeat)
- Metadata and auto-commit configuration
- Header extraction support
- Telemetry and error backoff configuration

Requires Kibana ^9.4.0 and format_version 3.6.0 for multi-signal support.

Closes #17139

Co-authored-by: Mario Rodriguez Molins <mrodm@users.noreply.github.com>
@mrodm mrodm self-assigned this Feb 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 17, 2026

✅ Vale Linting Results

No issues found on modified lines!


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.

Copy link
Copy Markdown
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 template has a structural issue where SASL and Kerberos authentication blocks could both generate separate auth: YAML keys, creating invalid YAML. See inline comment for the fix.


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

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

Comment thread packages/kafka_input_otel/agent/input/input.yml.hbs
@andrewkroh andrewkroh added New Integration Issue or pull request for creating a new integration package. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. labels Feb 17, 2026
Copy link
Copy Markdown
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 duplicate auth: block issue (SASL vs Kerberos generating separate YAML keys) identified in the prior review remains the blocking issue. Once fixed using {{else if kerberos_service_name}}, the package should be ready.

Consider adding policy tests for SASL and Kerberos authentication branches once the template is fixed, to catch this class of issue in the future.


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

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

Copy link
Copy Markdown
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 duplicate auth: block issue identified in prior reviews (SASL vs Kerberos generating separate YAML keys) still needs to be fixed before this can be approved. No additional issues found.


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

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

Ensure that auth.sasl and auth.kerberos are not set at the same time.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
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 authentication template logic at lines 96-167 in input.yml.hbs is still broken. The attempted fix from prior reviews created a new problem: when kerberos_service_name is set without sasl_mechanism, both the kerberos block at lines 127-146 AND the duplicate kerberos block at lines 148-166 are output, creating invalid YAML with duplicate kerberos: keys.

The entire auth section (lines 96-167) needs to be replaced with the single, clean if/else-if structure provided in the inline comment.


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

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

Comment thread packages/kafka_input_otel/agent/input/input.yml.hbs
Removed redundant SASL and Kerberos authentication options to streamline the configuration process. Ensured that only relevant authentication settings are retained for clarity and maintainability.
Streamlined the Kerberos authentication configuration by removing redundant checks and ensuring that the keytab file is only referenced when the keytab option is enabled. This improves clarity and maintainability of the authentication settings.
@mrodm
Copy link
Copy Markdown
Collaborator Author

mrodm commented Feb 17, 2026

Working on adding system tests to validate that it works as expected.

Copy link
Copy Markdown
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 auth block issues from prior reviews appear to be fixed with proper {{else if kerberos_service_name}} syntax. See inline comment for remaining issue with the profiles block placement.


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

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

Comment thread packages/kafka_input_otel/agent/input/input.yml.hbs Outdated
@teresaromero teresaromero self-assigned this Feb 26, 2026
…, and otelcol

- Replace multi-variant (logs/metrics/traces/java8/zookeeper) setup with unified
  telemetrygen + otelcol + Kafka (KRaft) architecture
- Add _dev/build/docs/README.md template; docs rendered by elastic-package build
- Add otelcol config, telemetrygen Dockerfile/entrypoint, kraft/ directory
- Consolidate system tests to test-default-config.yml
- Update docker-compose, variants, input template, manifest

Made-with: Cursor
- Update Documentation section to reference _dev/build/docs/README.md template
- Update checklist: template rendered by elastic-package build

Made-with: Cursor
mrodm and others added 2 commits April 29, 2026 17:39
Add three new system test configurations to validate each signal type
(logs, metrics, traces) independently using otlp_proto encoding, along
with a test config.yml setting parallel execution to false for easier
debugging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mrodm and others added 3 commits April 29, 2026 19:44
Add {{else}} fallback to logs, metrics, and traces topic blocks in
input.yml.hbs so that explicitly setting an empty topics list emits
`topics: []` instead of falling back to receiver defaults. Also move
the unconditional `profiles: topics: []` outside the traces block so it
is always rendered regardless of traces configuration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Set empty arrays for unused signal topics (logs_topics, metrics_topics,
traces_topics) in per-signal test configs so the kafka receiver emits
`topics: []` for those signals rather than falling back to receiver
defaults.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the telemetrygen shell script container with a custom Go
generator (modelled on otlp_input_otel) that sends 1000 logs, metrics,
and traces in parallel via gRPC to otelcol:4317. Instead of waiting for
a SIGHUP signal, the generator polls the otelcol health endpoint
(otelcol:13133) and starts sending once it responds healthy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mrodm and others added 2 commits April 30, 2026 11:30
Update architecture description to replace telemetrygen references with
the custom Go generator, document the dual Kafka exporter topics and
encodings, and note the batch processor added to otelcol.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrodm mrodm added the New Integration Issue or pull request for creating a new integration package. label Apr 30, 2026
mrodm and others added 2 commits April 30, 2026 12:59
- Update secret handling: password fields now use `secret: true`,
  supported from Kibana v9.2.7, v9.3.2, and v9.4.0+ (fleet-server#6277)
- Add Kibana version requirements section: logs/metrics require ^9.2.0,
  traces and multi-signal packages (dynamic_signal_types: true) require ^9.4.0
- Clarify README approach: docs/README.md can be written directly or
  generated from _dev/build/docs/README.md template (optional)
- Update submission checklist to reflect the above changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a Multi-Signal Packages section explaining how to use
dynamic_signal_types: true for receivers that emit multiple signal
types, including a manifest snippet, service.pipelines template
example, and a note on the Kibana 9.4.0+ requirement. Also update
the kafka_input_otel entry in the examples table to reflect its
multi-signal nature.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@andrewkroh andrewkroh removed the New Integration Issue or pull request for creating a new integration package. label Apr 30, 2026
mrodm and others added 2 commits April 30, 2026 14:08
…Interval

- Replace wg.Add/defer wg.Done goroutine boilerplate with wg.Go (Go 1.25+)
- Extract sendSignal helper to eliminate three near-identical goroutine blocks
- Name the 100ms periodic reader interval as metricInterval constant

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ages docs

The type-mapping table now links readers directly to the Variable Types
section where the Kibana version requirement for secret: true is explained.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
mrodm and others added 2 commits April 30, 2026 16:28
…eference

The batch processor was removed from the otelcol pipeline but the README
still described it. Also fix a stale telemetrygen reference in the
otelcol config comment.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace 'via' with 'using' and 'e.g.' with 'for example' to comply with
the Elastic Docs style guide (Elastic.Latinisms rule).

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @mrodm @teresaromero

@mrodm mrodm marked this pull request as ready for review April 30, 2026 15:51
@mrodm mrodm requested review from a team as code owners April 30, 2026 15:51
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.

Create Input Package: Kafka receiver

4 participants