Add response body size limitation to mitigate memory usage risks.
Currently, IIUC, the http transport for the OTLP exporters does not limit the amount of data read on the response:
|
const responseData: Buffer[] = []; |
|
res.on('data', chunk => responseData.push(chunk)); |
|
|
|
res.on('end', () => { |
Refer to open-telemetry/opentelemetry-proto#781
This recommends limiting to 4MiB (uncompressed).
Notes:
Add response body size limitation to mitigate memory usage risks.
Currently, IIUC, the http transport for the OTLP exporters does not limit the amount of data read on the response:
opentelemetry-js/experimental/packages/otlp-exporter-base/src/transport/http-transport-utils.ts
Lines 59 to 62 in 786eefd
Refer to open-telemetry/opentelemetry-proto#781
This recommends limiting to 4MiB (uncompressed).
Notes: