opentelemetry-collector
opentelemetry-collector copied to clipboard
`error_output_paths` configuration doesn't work as expected
trafficstars
Component(s)
service
What happened?
Describe the bug
The error_output_paths configuration doesn't behave the way I expected it to. I expected that setting this value in service::telemetry::logs would send all errors to the configured path. But as per the zap documentation:
// ErrorOutputPaths is a list of URLs to write internal logger errors to.
// The default is standard error.
//
// Note that this setting only affects internal errors; for sample code that
// sends error-level logs to a different location from info- and debug-level
// logs, see the package-level AdvancedConfiguration example.
This was identified as part of the work in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/40491#issuecomment-2949691001
Steps to reproduce
Run a collector w/ the configuration:
service:
telemetry:
logs:
output_paths: ["stdout"]
error_output_paths: ["stderr"]
What did you expect to see?
Error logs going to stderr, and other logs going to stdout
What did you see instead?
All my collector logs going to stdout
Collector version
latest
Environment information
Environment
OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")
Additional context
No response