Skip to content

Dynamic exporter config #39339

@lopezchr

Description

@lopezchr

Component(s)

No response

Describe the issue you're reporting

I need to config an exporter dynamically using some variables created on previews pipeline step. Specifically, I'm working on passing logs that have to be distribute on different streams on AWS cloudwatch. the exporter needs to configure the stream that will be used but, in my case, it has to be dynamic because it depends to the pod information from the source. I've tried with attributes processor to generate the variables and then use these on the exporter, but it didn't work:

processors:
  attributes/logs:
      actions:
        -  key: log_stream_name
            value: "${service.version}"
            action: upsert

exporters:
  awscloudwatchlogs:
    region: us-east-1
    log_group_name: "/eks-logs/default-group"
    log_stream_name: "${log_stream_name}"

service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [attributes/logs:]
      exporters: [awscloudwatchlogs]

At the moment of initialization, the service uses this configuration as literal but not dynamically. What can I do?

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