Skip to content

exporter/kafkaexporter: Ability to add custom Log and Metric Marshalers #14514

Closed
@bgranetzke

Description

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

There is currently no way to configure custom Log and Metric marshalers without forking the code line.

Describe the solution you'd like

I'd like two additional additional export factory options: WithLogsMarshalers and WithMetricsMarshalers which work exactly the same as the existing WithTracesMarshalers option (except with with logs and metrics, respectively)

Describe alternatives you've considered

I was going to contribute the custom marshalers I was building for my use case, but there was at least one other PR which attempted to contribute keyed messages which had trouble getting pushed through. Also, when searching related issues, there are several issues which involve site-specific log formats which could benefit from the more general option to extend without forking.

Additional context

This PR was exactly what I needed, but it ended with:

The minimal required testing of custom encodings is that the encoded data matches a known output.
Testing that the set encoding matches the expected result is just the start.
...and the author abandoned the PR.

This PR started where that PR left off except it attempted to solve the testing requirement above. I tried to limit impact radius to make the basic options testable, but I could not come up with an elegant way. I'm open to suggestions.

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions