Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add pipeline ID to the error message for unused connectors. #12410

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sudiptob2
Copy link

@sudiptob2 sudiptob2 commented Feb 17, 2025

Description

As mentioned in this #8721 (comment), the error message for unused connectors currently lacks specific pipeline names, making debugging more difficult.

This PR enhances the error message by including pipeline names in the [signal/name] format, consistent with how they appear in config.yaml. This provides a better context for identifying misconfigurations.

Link to tracking issue

Related to #8721

Testing

A few scenarios and example output are given below. I will do additional testing and add unit tests if necessary.

1. Used as a receiver but not used as an exporter with 1 signal

config.yaml
receivers:
  otlp:
    protocols:
      grpc:
exporters:
  debug:
connectors:
  forward:
service:
  pipelines:
    logs/in:
      receivers: [otlp]
      processors: []
      exporters: [debug]
    logs/out:
      receivers: [forward]
      processors: []
      exporters: [debug]

Main Branch Output:

Error: failed to build pipelines: connector "forward" used as receiver in logs pipeline but not used in any supported exporter pipeline

Proposed Output:

Error: failed to build pipelines: connector "forward" used as receiver in [logs/out] pipeline but not used in any supported exporter pipeline

2. Plain

config.yaml
receivers:
  otlp:
    protocols:
      grpc:
exporters:
  debug:
connectors:
  forward:
service:
  pipelines:
    traces:
      receivers: [ otlp ]
      processors: [ ]
      exporters: [ forward ]
    metrics:
      receivers: [ forward ]
      processors: [ ]
      exporters: [ debug ]

Main Branch Output:

Error: failed to build pipelines: connector "forward" used as exporter in traces pipeline but not used in any supported receiver pipeline

Proposed Output:

Error: failed to build pipelines: connector "forward" used as exporter in [traces] pipeline but not used in any supported receiver pipeline

3. Multiple pipeline

config.yaml
receivers:
  otlp:
    protocols:
      grpc:
exporters:
  debug:
connectors:
  forward:
service:
  pipelines:
    logs/in:
      receivers: [otlp]
      processors: []
      exporters: [forward]
    logs/in2:
      receivers: [ otlp ]
      processors: [ ]
      exporters: [ forward ]
    logs/out:
      receivers: [otlp]
      processors: []
      exporters: [debug]
    traces:
      receivers: [ otlp ]
      processors: [ ]
      exporters: [ forward ]
    metrics:
      receivers: [ forward ]
      processors: [ ]
      exporters: [ debug ]

Main Branch Output:

Error: failed to build pipelines: connector "forward" used as exporter in logs pipeline but not used in any supported receiver pipeline

Proposed Output:

Error: failed to build pipelines: connector "forward" used as exporter in [logs/in2 logs/in] pipeline but not used in any supported receiver pipeline

Copy link

linux-foundation-easycla bot commented Feb 17, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@sudiptob2 sudiptob2 force-pushed the feat/8721/add-full-pipeline-name branch 3 times, most recently from bfa89c4 to b043489 Compare February 18, 2025 01:40
@sudiptob2 sudiptob2 marked this pull request as ready for review February 18, 2025 01:46
@sudiptob2 sudiptob2 requested a review from a team as a code owner February 18, 2025 01:46
@sudiptob2 sudiptob2 force-pushed the feat/8721/add-full-pipeline-name branch 2 times, most recently from a3130ef to a3fc63c Compare February 18, 2025 18:21
@sudiptob2
Copy link
Author

Thank you so much for your quick response and amazing suggestions. I have made the adjustment, let me know how it looks @bogdandrutu

@sudiptob2 sudiptob2 force-pushed the feat/8721/add-full-pipeline-name branch from a3fc63c to 372ab66 Compare February 19, 2025 00:24
@sudiptob2 sudiptob2 force-pushed the feat/8721/add-full-pipeline-name branch from 372ab66 to 9faed07 Compare February 19, 2025 18:49
Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants