Skip to content

[receiver/k8sobjectsreceiver] Refactor Config Struct to Separate Mutable Fields #39553

Open
@krisztianfekete

Description

@krisztianfekete

Component(s)

receiver/k8sobjects

What happened?

Description

Today, in newReceiver function, we perform a shallow copy of the K8sObjectsConfig objects from the Config struct. Fields within these objects require a deep copy.

As per https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/39469/files/2945159295b832fc7acae51b388d37041d71e9df#r2053684803, we should refactor the Config struct to separate mutable fields into a new dedicated struct type.

cc. @ChrsMark to extend ticket if needed.

Collector version

NA

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

Log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions