chore: added proper logging for config module#2514
chore: added proper logging for config module#2514aryamohanan wants to merge 1 commit intofix-config-precedencefrom
Conversation
8086554 to
d72590b
Compare
abhilash-sivan
left a comment
There was a problem hiding this comment.
I could see a duplicate log:
{"level":20,"time":"2026-05-04T10:42:49.871Z","threadId":0,"name":"@instana/collector","msg":"[config] env:config.tracing.useOpentelemetry: true"}
The App is using the following preload flags: --require ./instana-collector-5.4.1/src/immediate.js
{"level":30,"time":"Mon, 04 May 2026 10:42:49 GMT","pid":29873,"hostname":"Abhis-MacBook-Pro.local","msg":"Server is running on http://localhost:3000"}
{"level":20,"time":"2026-05-04T10:42:49.872Z","threadId":0,"name":"@instana/collector","msg":"[config] env:config.tracing.useOpentelemetry: true"}
{"level":30,"time":"2026-05-04T10:42:49.874Z","threadId":0,"name":"@instana/collector","msg":"PID Store starting with pid 29873"}
here [config] env:config.tracing.useOpentelemetry: true is logged twice. Please check
d72590b to
91ca766
Compare
|
|
I have
I tested the same on main as well. Currently, we don’t have logging for this in main, but I added a log and verified it locally. The log appears twice because the entry file invokes this twice, and the normalisation runs in both. That’s why the log is printed twice. We should look into a more graceful way to handle this.
|
I think we can proceed with the current logging approach. Some configuration options in the main setup already result in duplicate logs—for example, INSTANA_TRACING_DISABLE=true. When debug mode is enabled, logs may appear twice. This happens because coreConfig.normalize() is invoked twice during collector initialization. If any configuration value changes between those calls, it may be logged again as a separate update. This behavior is intentional for now and can be revisited later if necessary. Overall, these configuration logs are quite required, especially when troubleshooting or diagnosing issues. |



No description provided.