Skip to content

[http exporter] error callback is called twice #5990

@david-luna

Description

@david-luna

What happened?

Steps to Reproduce

There is an ongoing PR that reproduces the issue in a test. See https://github.com/open-telemetry/opentelemetry-js/pull/5928/files#r2406049422

Expected Result

The error callback should be called only once.

Actual Result

The callback is called twice.

Additional Details

The sendWithHttp method attaches a handler for the error event in the request object here

and afterwards it attaches the same handler in the the stream created for compression and for writing into the request in different places like here

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpkg:otlp-exporter-basepriority:p4Bugs and spec inconsistencies which do not fall into a higher prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions