mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-14 20:34:30 +01:00
6fef3dffff
Adds `github.copilot.chat.otel.maxAttributeSizeChars` setting and `COPILOT_OTEL_MAX_ATTRIBUTE_SIZE_CHARS` env var to control truncation of free-form OTel content attributes (prompts, responses, tool arguments/results, hook input/output). Default is `0` (unlimited), matching the OTel spec's `AttributeValueLengthLimit` default of `Infinity`. Users on backends with per-attribute size limits can set a positive value to keep OTLP batches under the backend cap. Plumbs the resolved limit through every call site that previously hit a hardcoded 64KB fallback. Drops the `DEFAULT_MAX_OTEL_ATTRIBUTE_LENGTH` constant; `truncateForOTel`'s default arg is now `0` (unlimited). Refs #299952