Description
#3745 wired the new onDrop callback of InMemoryTelemetryBuffer for the log buffer so that oversized or unencodable logs record client report outcomes (buffer_overflow / internal_sdk_error).
The metric buffer (created in InMemoryTelemetryProcessorIntegration._createMetricBuffer) does not pass onDrop, so metrics dropped by the buffer (item exceeds maxBufferSizeBytes, or the encoder throws) are silently lost without any discarded-event outcome.
Expected
Metrics dropped by the buffer record a client report outcome with the trace_metric data category:
buffer_overflow when the encoded item exceeds the buffer limit
internal_sdk_error when encoding fails
Notes
Related: #3751 (same gap for spans). Follow-up to #3745.
Description
#3745 wired the new
onDropcallback ofInMemoryTelemetryBufferfor the log buffer so that oversized or unencodable logs record client report outcomes (buffer_overflow/internal_sdk_error).The metric buffer (created in
InMemoryTelemetryProcessorIntegration._createMetricBuffer) does not passonDrop, so metrics dropped by the buffer (item exceedsmaxBufferSizeBytes, or the encoder throws) are silently lost without any discarded-event outcome.Expected
Metrics dropped by the buffer record a client report outcome with the
trace_metricdata category:buffer_overflowwhen the encoded item exceeds the buffer limitinternal_sdk_errorwhen encoding failsNotes
onDropinfrastructure already exists inin_memory_buffer.dart; this is mostly wiring inprocessor_integration.dartanalogous to the log buffer.Related: #3751 (same gap for spans). Follow-up to #3745.