Skip to content

[receiver/kafka] Evaluate support for topic and exclude topic as an array #44477

@paulojmdias

Description

@paulojmdias

Component(s)

receiver/kafka

Is your feature request related to a problem? Please describe.

Currently, the topic and exclude_topic configuration fields are defined as single strings. However, the internal implementation already passes these as arrays for future-proofing. It would be useful to evaluate supporting multiple topics and exclude patterns directly in the configuration to allow the same receiver to handle multiple topics.

Describe the solution you'd like

Evaluate transforming the configuration fields to support arrays:

topictopics (array of strings)
exclude_topicexclude_topics (array of strings)

This would allow users to configure multiple topic patterns and exclusions in a single receiver instance, for example:

kafka:
  traces:
    topics:
      - "^traces-prod-.*"
      - "^traces-staging-.*"
    exclude_topics:
      - "^traces-prod-internal-.*"
      - "^traces-staging-test-.*"

This could be done without a breaking change, and support both options for some time.

Describe alternatives you've considered

No response

Additional context

Related PR: #44118 (added exclude_topic support) Discussion reference: #44118 (comment)

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions