Skip to content

Append components flag #8754

Open
Open
@djaglowski

Description

@djaglowski

Is your feature request related to a problem? Please describe.
When merging configurations, it would be helpful to be able to do the following:

  • Add a receiver, processor, or exporter to an existing pipeline
  • Add an extension to the service

For example, consider the following configs.

# main.yaml
receivers:
  otlp/in:
processors:
  batch:
exporters:
  otlp/out:
extensions:
  file_storage:

service:
  pipelines:
    traces:
      receivers: [ otlp/in ]
      processors: [ batch ]
      exporters: [ otlp/out ]
  extensions: [ file_storage ]
# extra_receiver.yaml
receivers:
  foo:

service:
  pipelines:
    traces:
      receivers: [ foo ]
# extra_extension.yaml
extension:
  bar:

service:
  extensions: [ bar ]

If a user provides the above configs in the same order, it will clobber service::pipelines::traces::receivers and service::extensions, effectively removing the otlp/in receiver and file_storage extension from the configuration.

Describe the solution you'd like
I propose that these lists are components are a special case and that we should provide the option to append to them, rather than clobber them.

Specifically I propose that we add a flag to the collector, e.g. --append-components or --merge-components-mode=append, which will enable this behavior when merging configs.

Describe alternatives you've considered
The same idea could be applied at a more granular level. A simple option would be to have a similar series of flags, e.g. --append-receivers, ...

Additional context
Several recent SIG meetings have included some discussion of idea along these lines. Additionally, some issues may be related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions