-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
the configuration file path is all over the place #31403
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I agree it would be easier if there was a standard configuration path used by Otelcol Docker images, at the very least by the Otelcol core and contrib. It would also help if the Overview for Otel core and contrib in Docker Hub was not empty, but instead described how to use the images with your own configuration. |
My main concern is how big of a breaking change this may be, but overall it's a good idea. It's confused me plenty of times, so I agree it would be nice to have one path. Feel free to submit a PR and the impact and path can be discussed there. |
Probably the minority opinion here, but I feel like having a default configuration in Dockerfiles is not very useful and if we were to change it my vote would be to remove the default configuration entirely |
The google cloud exporter README suggests that the configfile is in /etc/otel/config.yaml; but it's not. (and I pulled my hair out for a while trying to figure out why my config was not working). **Description:** I changed the path used for the config file in the example to reflect the path used / set in the Dockerfile. **Link to tracking Issue:** #31403 --------- Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
@crobert-1 has a good point that changing the paths would be a breaking change of big blast radius. I'd be fine with just documenting the paths used currently in the image registry (Docker Hub). |
…try#31404) The google cloud exporter README suggests that the configfile is in /etc/otel/config.yaml; but it's not. (and I pulled my hair out for a while trying to figure out why my config was not working). **Description:** I changed the path used for the config file in the example to reflect the path used / set in the Dockerfile. **Link to tracking Issue:** open-telemetry#31403 --------- Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
…try#31404) The google cloud exporter README suggests that the configfile is in /etc/otel/config.yaml; but it's not. (and I pulled my hair out for a while trying to figure out why my config was not working). **Description:** I changed the path used for the config file in the example to reflect the path used / set in the Dockerfile. **Link to tracking Issue:** open-telemetry#31403 --------- Co-authored-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This was recently brought up again on open-telemetry/opentelemetry-collector-releases/issues/530. I am going to close this and we can continue discussing on the other issue, since this pertains to opentelemetry-collector-releases |
Component(s)
cmd/opampsupervisor, cmd/otelcontribcol, exporter/googlecloud (amongst others)
What happened?
Description
The problem is that it seems that there are several "standard" locations to put the config file. I have seen:
/etc/otel/config.yaml
/etc/otelcol/config.yaml
/etc/otelcol-contrib/config.yaml
And there are several Docker Image releases that read it, by default, from different places. - As a result getting started with OpenTelemetry is harder than it needs to be. I wasted time following this example on the googelcloudexporter, only to later find out the config path in the example is wrong.
docker run
--volume ~/service-account-key.json:/etc/otel/key.json
--volume $(pwd)/config.yaml:/etc/otel/config.yaml
--env GOOGLE_APPLICATION_CREDENTIALS=/etc/otel/key.json
--expose 4317
--expose 55681
--rm
otel/opentelemetry-collector-contrib
I'll make a PR to fix this instance on googelcloudexporter but I see it is happening on a lot of places: Amongst others: (search in the repo for "/etc/ote"
https://github.com/dhrp/opentelemetry-collector-contrib/blob/main/cmd/opampsupervisor/specification/README.md#L137
https://github.com/dhrp/opentelemetry-collector-contrib/blob/main/cmd/otelcontribcol/Dockerfile#L15
https://github.com/dhrp/opentelemetry-collector-contrib/blob/3652b444802fad4819b50fbda41e0957000d8279/examples/couchbase/docker-compose.yaml#L16
https://github.com/dhrp/opentelemetry-collector-contrib/blob/main/exporter/googlecloudexporter/README.md#L60
What I propose is picking one location, and unifying all Dockerfiles, documentation and stuff to use that path by default. I know it's probably not easy to do, as it "may" break things, depending on how it's done, but it'll save lots of time in the future.
Steps to Reproduce
Follow the instructions on https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/googlecloudexporter/README.md, add the provided config file onto the suggested path.
Expected Result
Logs flowign to Google Cloud
Actual Result
Some debug logs coming out of the container, but nothing showing up on google. - No errors. -> Didn't realize config was never used!
Collector version
v0.95.0
Environment information
Environment
All
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: