Skip to content

Record client report outcomes for metrics dropped by the telemetry buffer #3752

Description

@buenaflor

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions