Skip to content

Avoid duplicate error output between Cobra and otelcol logging #14302

@byehn

Description

@byehn

Component(s)

otelcol

Describe the issue you're reporting

Currently, the cobra.Command constructed in otelcol does not set SilenceErrors to true. At the same time, command execution errors are handled in runInteractive, where they are logged at fatal level.

Given that errors are already logged explicitly through "log" package(with fatal level), it seems redundant for Cobra to also print errors directly to stderr. Based on this, I’d like to propose setting SilenceErrors: true on the cobra.Command to avoid duplicate error output.

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

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