diff --git a/CHANGELOG.md b/CHANGELOG.md index daa351e51d1..651c54da10b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/ ### :bug: (Bug Fix) +* fix(otlp-proto-exporter-base): Match Accept header with Content-Type in the proto exporter + [#3562](https://github.com/open-telemetry/opentelemetry-js/pull/3562) @scheler + ### :books: (Refine Doc) ### :house: (Internal) diff --git a/experimental/packages/otlp-proto-exporter-base/src/platform/browser/OTLPProtoExporterBrowserBase.ts b/experimental/packages/otlp-proto-exporter-base/src/platform/browser/OTLPProtoExporterBrowserBase.ts index 1b386855e48..4e9f95d5c0d 100644 --- a/experimental/packages/otlp-proto-exporter-base/src/platform/browser/OTLPProtoExporterBrowserBase.ts +++ b/experimental/packages/otlp-proto-exporter-base/src/platform/browser/OTLPProtoExporterBrowserBase.ts @@ -75,7 +75,11 @@ export abstract class OTLPProtoExporterBrowserBase< sendWithXhr( new Blob([body], { type: 'application/x-protobuf' }), this.url, - { ...this._headers, 'Content-Type': 'application/x-protobuf' }, + { + ...this._headers, + 'Content-Type': 'application/x-protobuf', + Accept: 'application/x-protobuf', + }, this.timeoutMillis, onSuccess, onError