Skip to content
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

http-transport-utils logs success as error #5367

Open
mattfysh opened this issue Jan 24, 2025 · 2 comments
Open

http-transport-utils logs success as error #5367

mattfysh opened this issue Jan 24, 2025 · 2 comments
Labels
runtime:bun Unsupported Runtime Bun

Comments

@mattfysh
Copy link

mattfysh commented Jan 24, 2025

const reportTimeoutErrorEvent = nodeVersion >= 14 ? 'close' : 'abort';
req.on(reportTimeoutErrorEvent, () => {
onDone({
status: 'failure',
error: new Error('Request timed out'),
});
});

Log line:

{
   "message":"Request timed out",
   "originalLine":"59",
   "originalColumn":"25",
   "line":"87",
   "column":"24",
   "sourceURL":"/bun/node_modules/@opentelemetry/otlp-exporter-base/build/src/transport/http-transport-utils.js",
   "stack":"@see below",
   "name":"Error"
}

Stack:

Error: Request timed out
    at <anonymous> (/bun/node_modules/@opentelemetry/otlp-exporter-base/build/src/transport/http-transport-utils.js:87:24)
@pichlermarc pichlermarc added the runtime:bun Unsupported Runtime Bun label Jan 24, 2025
@pichlermarc
Copy link
Member

This seems to be a duplicate of #5260
Seems to be due to a difference in Node.js and Bun's implementations of the 'http' module.

@pichlermarc
Copy link
Member

Regardless of that, I think it is true that we should not use the close event like this. It would probably also cause the callback to be called even if a success response has been received already. Fixes would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime:bun Unsupported Runtime Bun
Projects
None yet
Development

No branches or pull requests

2 participants