opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

ENOENT: no such file or directory, open '/home/webapp/.aws/config'

Open aschuhl opened this issue 1 year ago • 3 comments
trafficstars

  • [x] This only affects the JavaScript OpenTelemetry library
  • [ ] This may affect other libraries, but I would like to get opinions here first

We have an api running opentel and keep getting the error:

ENOENT: no such file or directory, open '/home/webapp/.aws/config'

with the stacktrace pointing to OpenTel:

Error: ENOENT: no such file or directory, open '/home/webapp/.aws/config'
    at Object.openSync (fs.js:498:3)
    at Object.patchedFunction [as openSync] (/var/app/current/node_modules/@opentelemetry/instrumentation-fs/build/src/instrumentation.js:115:33)
    at Object.readFileSync (fs.js:394:35)
    at AsyncLocalStorage.run (async_hooks.js:314:14)
    at AsyncLocalStorageContextManager.with (/var/app/current/node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js:33:40)
    at ContextAPI.with (/var/app/current/node_modules/@opentelemetry/api/build/src/api/context.js:60:46)
    at Object.patchedFunction [as readFileSync] (/var/app/current/node_modules/@opentelemetry/instrumentation-fs/build/src/instrumentation.js:125:45)
    at Object.readFileSync (/var/app/current/node_modules/aws-sdk/lib/util.js:95:26)
    at parseFile (/var/app/current/node_modules/aws-sdk/lib/shared-ini/ini-loader.js:6:38)
    at IniLoader.loadFrom (/var/app/current/node_modules/aws-sdk/lib/shared-ini/ini-loader.js:72:25)

Is there something wrong in our configuration? Please note we are not using a credentials as it is on a server, and it seemingly works sometimes.

aschuhl avatar Feb 23 '24 21:02 aschuhl

Is this also happening without OTel instrumentation registered? The stack-trace and the error actually suggest that /home/webapp/.aws/config does not exist.

It is natural for OTel to turn up in the stack trace on errors like ENOENT as we're instrumenting the fs package (by wrapping fs code). To generate telemetry we need to do that without modifying fs behavior.

Now, if this only happens when OTel instrumentations are registered then this is a bug in the instrumentation and we'd need to look into that.

pichlermarc avatar Feb 28 '24 13:02 pichlermarc

Is this also happening without OTel instrumentation registered?

@aschuhl any update on the requested info? Otherwise we'll likely not be able to help.

pichlermarc avatar Mar 06 '24 11:03 pichlermarc

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar May 06 '24 06:05 github-actions[bot]

This issue was closed because it has been stale for 14 days with no activity.

github-actions[bot] avatar May 20 '24 06:05 github-actions[bot]