Open petertakacs opened 8 months ago
@petertakacs I can not reproduce on my environment. I use the image otel/opentelemetry-collector-contrib:0.92.0
The collector you use is built by your own, not from official opentelemetry image repo, right?
@fatsheep9146 I did some debugging seems like the :8888
default port is set here regardless if the new reader config is provided or not
This might be the problematic part where the code checks only the Address and logs a warning by default: https://github.com/open-telemetry/opentelemetry-collector/blob/1cea6363f60421d4faed7469ccdcae25f82231b2/service/telemetry.go#L122
The collector I'm using is built from the official repo using the ocb (https://github.com/open-telemetry/opentelemetry-collector/releases/download/cmd%2Fbuilder%2Fv0.92.0/ocb_0.92.0_linux_amd64)
Describe the bug When config
service::telemetry::metrics::readers
contains a prometheus exporter, the collector incorrectly logs a warn message to the console thataddress
field is deprecated:2024-01-15T13:10:16.667+0100 warn service@v0.92.0/telemetry.go:124 service::telemetry::metrics::address is being deprecated in favor of service::telemetry::metrics::readers
Steps to reproduce Run the collector with the following config:
What did you expect to see? If I specify the
metrics::readers
fields with--feature-gates=telemetry.useOtelForInternalMetrics
--feature-gates=telemetry.useOtelWithSDKConfigurationForInternalTelemetry
flags, I should not see the warningWhat version did you use? v0.92 (with ocb)
Environment Go: go version go1.21.4 darwin/arm64
OS: ProductName: macOS ProductVersion: 13.3.1 ProductVersionExtra: (a) BuildVersion: 22E772610a
Additional context If the address is specified as an empty string I don't get the warning (as expected)