Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[component] Print path to error in ValidateConfig #12108

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

evan-bradley
Copy link
Contributor

Description

Follow up to #12102.

This prints the full path to where the error occurred in a config object using available reflection metadata. Currently some paths will be duplicated until we shift otelcol to call component.ValidateConfig on otelcol.Config and remove manual calls to Validate, but no information will be missing. If this is a concern we can do both steps at once.

Example error messages:

collector server run finished with error: invalid configuration: receivers::otlp: must specify at least one protocol when using the OTLP receiver
service::telemetry: collector telemetry metrics reader should exist when metric level is not None, level is Normal

I'll clean this PR up once #12102 is merged, but you can see the latest commit for the changes relevant to only this PR.

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

Successfully merging this pull request may close these issues.

1 participant