Skip to content

[cmd/opampsupervisor] config not updated in opampSupervisor/opampExtension when processor pipeline already exists #36405

Open
@keisukesakasai

Description

Component(s)

cmd/opampsupervisor

What happened?

Description

I am using the OpenTelemetry Collector Contrib cmd/opampsupervisor to run the Supervisor and the OTel Collector.
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor

To add additional configurations to the OTel Collector, I set the following in extraconfig.yaml:

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

exporters:
  debug:

  otlp:
    endpoint: localhost:4317
    tls:
      insecure: true

processors:
  batch:
        
service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [debug, otlp]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]    
  telemetry:
    logs:
    ...

With this configuration, I send the following config via OpAMP from the OpAMP Backend:
CleanShot 2024-11-17 at 14 57 00

processors:
  batch:
  attributes:
    actions:
      - key: hoge
        value: piyo
        action: insert
service:
  pipelines:
    traces:
      processors:
        - attributes

This works perfectly.
CleanShot 2024-11-17 at 14 53 04

Next, I update the extraconfig.yaml to include the batch processor in the trace pipeline beforehand:

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317

exporters:
  debug:

  otlp:
    endpoint: localhost:4317
    tls:
      insecure: true

processors:
  batch:
        
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch] # <==================== add
      exporters: [debug, otlp]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]    
  telemetry:
    logs:
    ...

However, when I send the same config from the OpAMP Backend, the config (effective.yaml) is not updated.
Is this behavior as intended?

Steps to Reproduce

Experimenting with the supervisor
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor#experimenting-with-the-supervisor

Expected Result

In both cases, the config is updated.

Actual Result

In the following case, the config is not updated, and the OTel Collector is not restarted.

Collector version

v0.113.0

Environment information

Environment

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

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