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

Initialize config from collector binary #5654

Closed
svrnm opened this issue Jul 8, 2022 · 2 comments
Closed

Initialize config from collector binary #5654

svrnm opened this issue Jul 8, 2022 · 2 comments
Labels

Comments

@svrnm
Copy link
Member

svrnm commented Jul 8, 2022

Follow up to my question at #5648

Is your feature request related to a problem? Please describe.
Not all releases of the otel collector come with a default configuration (linux, windows, mac tar.gz) or the default config is not easily accessible (docker image). As a new comer I need to "go searching" (otel docs, examples, ...) to have something I can start from.

Describe the solution you'd like
I was wondering, if there would be interest in adding something like an --init option/subcommand to the collector binary that writes a config.yml to the current working directory. In a version 1 that command could just write a very basic config file (otlp receivers for everything, otlp exporter (disabled) & logging exporter (enabled)). In a version 2 an addition could either be a set of questions that the end-user can answer to get their perfect setup (like npm init or composer init etc do it) or options to --init like --init=minimal, or --init=full ...

Describe alternatives you've considered
Of course as an alternative the packages for linux, windows, mac could just contain a sample config.yaml.

Additional context

This could also simplify the getting started guides for the individual languages, when the OTLP exporter is introduced, e.g.:

The Configure and run a local collector section in the python docs (which eventually should be the same for the other languages) could be reduced to

$ otelcol --init
Writing configuration file './config.yaml'
$ otelcol --config=./config.yaml
2022-07-08T11:40:08.867+0200	info	service/telemetry.go:107	Setting up own telemetry...
...

(or the equivalent using docker)

@jpkrohling
Copy link
Member

Interesting idea. I think this would be nice to have.

@neelayu
Copy link
Contributor

neelayu commented Aug 22, 2022

@jpkrohling I have created a PR for this issue.

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

No branches or pull requests

3 participants