opentelemetry-collector
opentelemetry-collector copied to clipboard
Initialize config from collector binary
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)
Interesting idea. I think this would be nice to have.
@jpkrohling I have created a PR for this issue.