open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.07k stars 2.37k forks source link

Dynamic topic for googlecloudpubsub exporter #33547

Open JakubDaleki opened 5 months ago

JakubDaleki commented 5 months ago

Component(s)

exporter/googlecloudpubsub

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

Different logs (for example from different files) should be written to different topics on GCP PubSub. Current implementation allows only to specify one destination topic in static yaml config.

Describe the solution you'd like

I want to add a new flag to config topic_from_attribute. If set to true each log should be sent to a topic specified in Attribute gcp.topic of a LogRecord. If attribute is not present or is in invalid format logs should be sent to default topic specified in the topic field.

My PR showing changes needed to obtain this mechanism: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/33545/files

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 5 months ago

Pinging code owners:

github-actions[bot] commented 3 months ago

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:

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

JakubDaleki commented 3 months ago

/label exporter/googlecloudpubsub discussion-needed

github-actions[bot] commented 3 months ago

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