Skip to content

exporter/kafka: add support for defining message key as request metadata #40149

@axw

Description

@axw

Component(s)

exporter/kafka

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

We have a need to partition partition data within Kafka topics according to some metadata (e.g. another header) or data (e.g. a resource attribute, or by trace ID).

There are arbitrarily many ways one might want to partition data, and these apply to other components too, so this is best left to another component -- see #39199 for a proposal. That proposal involves injecting the message key into request metadata, which can then be referenced by the Kafka exporter.

Describe the solution you'd like

As described in #38888 (comment), I would like to introduce a configuration setting for extracting the message key from request metadata. Concretely, we should build on #39204 and introduce additional signal-specific message_key_from_metadata settings (alternative name welcome).

Describe alternatives you've considered

Originally I thought of making the message key templated, as described in #38888.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions