opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

kafkaexporter: Allowed for a keyed producer

Open MovieStoreGuy opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. The idea being that there is a way that data can be keyed when sending to Kafka to allow for ordered messages. It could be potentially useful who use an ordered dependant system and can not easily reconcile out of order data.

Describe the solution you'd like The ability to set the key data field(s) within the kafka exporter config in order to send keyed messages.

Describe alternatives you've considered There is ability to set a static keyed method (ie. keyed: "time", keyed:"resourceName") however, I am happy to further conversation here.

MovieStoreGuy avatar Oct 21 '21 00:10 MovieStoreGuy

Noticed https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/5264 was raised by @Frefreak but went stale.

Does that PR satisfy the needs of this issue & worth revising? If not, what would the implementation of a keyed producer look like so that others can contribute?

rcrowe avatar Feb 06 '22 17:02 rcrowe

Here a configurable "properties" to be keyed is wanted, but my PR only keyed the message by traceID though (intended to be used with tail-based sampling). Maybe that PR can be generalized (or make a new one) to support a pre-defined list/enum of attributes to be keyed.

Frefreak avatar Feb 07 '22 00:02 Frefreak

I am to start simple and make it more complex as we need :)

I was thinking that a user could configure a keyby by using some combination of name, time, resources, libraryname and perhaps attributes so you can do something like:

keyBy:
- field: time
  round: second
- field: name
- field: resources
- field: trace
  default: unknown

MovieStoreGuy avatar Feb 14 '22 01:02 MovieStoreGuy

Is there a sequel to this?

xiangtianyu avatar Aug 08 '22 06:08 xiangtianyu

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

github-actions[bot] avatar Nov 10 '22 03:11 github-actions[bot]

I am not sure if this can be achieved but if we did the keyBy option and allow us to use things like the traceId, spanId and/or the service.name, that would be fantastic for helping to ensure correct ordering. If this feature is added I can always do some testing if required.

@MovieStoreGuy anyway to get this out of stale?

rydevops avatar Dec 22 '22 03:12 rydevops

My thoughts here were to add an OTTL expression as part of the component config in order to point at the proper field to key off of. I have not seen any OTTL use in exporters and am not aware of all the limitations. Does this idea seem reasonable?

fredthomsen avatar Feb 17 '23 18:02 fredthomsen

Pinging code owners for exporter/kafka: @pavolloffay @MovieStoreGuy. See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Mar 12 '23 05:03 github-actions[bot]

I am not sure if this can be achieved but if we did the keyBy option and allow us to use things like the traceId, spanId and/or the service.name, that would be fantastic for helping to ensure correct ordering. If this feature is added I can always do some testing if required.

@MovieStoreGuy anyway to get this out of stale?

Sorted :)

MovieStoreGuy avatar Mar 23 '23 08:03 MovieStoreGuy

My thoughts here were to add an OTTL expression as part of the component config in order to point at the proper field to key off of. I have not seen any OTTL use in exporters and am not aware of all the limitations. Does this idea seem reasonable?

I really like this idea, reducing the amount of friction and improving the reusability is something I care deeply about. If anyone wanted to start on this, I would be more than happy to review.

MovieStoreGuy avatar Mar 23 '23 08:03 MovieStoreGuy

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • exporter/kafka: @pavolloffay @MovieStoreGuy

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar May 23 '23 03:05 github-actions[bot]

Hi guys. Is anyone working on this? We really need this feature :)

SHaaD94 avatar Jun 08 '23 04:06 SHaaD94

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

  • exporter/kafka: @pavolloffay @MovieStoreGuy

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Aug 08 '23 03:08 github-actions[bot]

This issue has been closed as inactive because it has been stale for 120 days with no activity.

github-actions[bot] avatar Oct 07 '23 05:10 github-actions[bot]