Skip to content

Dynamic topic for googlecloudpubsub exporter #33547

Closed as not planned
Closed as not planned
@JakubDaleki

Description

@JakubDaleki

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

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