[otlp-exporters] passing an undefined
header values crashes end-user apps
#4541
Labels
bug
Something isn't working
priority:p1
Bugs which cause problems in end-user applications such as crashes, data inconsistencies, etc
What happened?
When passing an options object like
{ headers: { foo: undefined } }
to the http/json and http/protobuf exporters, the headers will not be validated and that will causeopentelemetry-js/experimental/packages/otlp-exporter-base/src/platform/node/util.ts
Line 89 in abfe059
to throw, as we're passing an
undefined
header value. While this alone will not cause an application crash, trying to accessreq
atopentelemetry-js/experimental/packages/otlp-exporter-base/src/platform/node/util.ts
Line 62 in abfe059
will cause the end-user's application to crash within typically 10s after the first export (when using defaults).
The text was updated successfully, but these errors were encountered: