-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
User experience: starting the collector without config file yields a cryptic message #5648
Comments
Feel free to assign this to me. |
I am wondering if instead of throwing an error the collector could just start with a minimal configuration (otlp receivers, debug logging exporters for all signals)? Or would this be unexpected behavior / lead to more confusion ? |
We have that on the Helm chart, and it seems to have mixed feedback: open-telemetry/opentelemetry-helm-charts#90. We also have it on the Docker images, for which I have heard anecdotal negative feedback when open-telemetry/opentelemetry-collector-releases/issues/59 happened (since the Collector did not fail to start, just started with a different configuration). IMO it's hard to agree on what this minimal configuration should be: different people have different ideas and use cases in mind, and the official binaries should probably be neutral in this regard and just provide high-quality examples outside of the binary. |
I share those mixed feeling, but I thought asking/exploring that would be helpful. From the perspective of a user that's just getting started having some easy defaults would be great, but for someone using the collector in production such a behavior might be harmful (especially what you said about the collector starting with a different/unexpected config vs just failing). There are probably better ways to serve new comers (and I might raise another issue for that), so my question got answered. Thanks! |
Started looking into this and can confirm it used to error with the following message:
It looks like it fails the way it does because the error is returned when creating a new config provider before it's even able to try and validate the configuration and get the friendlier error message. |
@jpkrohling when you said "configuration file is required to run the collector" do you mean an actual configuration file, or do you mean configuration provided via any valid source? |
@josephwoodward I think we can check for the presence of a |
Sorry, I meant a configuration provided from any valid source. |
When running the collector without specifying a config file, the error message that is returned doesn't immediately make it clear to users what the problem is:
I would prefer to have a validation somewhere before this error, stating that a configuration file is required to run the collector. I believe we even had this a few releases ago.
The text was updated successfully, but these errors were encountered: