﻿# Truncated trace attributes can merge distinct serving identities

A practical investigation of truncated trace attributes can merge distinct serving identities, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-observe-attribute-truncation-identity-collision/
Language: en

## The diagnostic situation

A model deployment identifier is stored as a trace attribute. A configured value-length limit keeps only the beginning, where several revisions share the same prefix. The dashboard now groups distinct deployments together. Requests still run against the correct models; the defect is in the observation representation, so investigating model routing alone may not reveal it.

## Why the observation changes meaning

OpenTelemetry common attribute rules allow configured string-value truncation. The specification counts characters for string limits, rather than assuming an encoded-byte length. Attribute limits are also distinct from log-body handling. A readable shortened label can be useful for display, but equality of shortened strings no longer establishes equality of the original deployment identity or configuration.

## Define the instrumentation contract

Separate a bounded display name from the authoritative safe correlation key. Define the key format, uniqueness scope and permitted length before export. If a compact registry key is used, preserve a controlled mapping to the full release identity. Do not simply hash private user input and assume it becomes harmless metadata. Model release metadata and user content require different handling.

## A bounded verification procedure

Create synthetic identifiers with an identical long prefix and different endings. Pass them through the actual SDK, processor chain and test destination. Compare the source values, exported attribute values and dashboard grouping. Repeat near the configured boundary, including multibyte characters in a permitted synthetic field. Verify the installed implementation rather than applying byte-count assumptions from another library.

## Evidence required for acceptance

Acceptance evidence includes effective value limits, original-to-exported mappings and an explicit collision check. Demonstrate that the chosen join key remains distinct even when display labels shorten. Test downstream transformations separately because a backend may impose another limit. Keep raw identifiers only where their classification permits retention, and retain an error count when a required identity cannot be represented safely.

## Failure cases and limits

Raising the limit everywhere can increase memory and export volume, while moving values into the log body merely changes the boundary and may bypass intended controls. The objective is reliable bounded identity, not unlimited metadata. This protocol detects representation collisions in tested paths; it cannot prove global uniqueness of arbitrary external identifiers or recover an original suffix already discarded upstream.

## Primary references and related reading

A shortened display value must not silently become the identity used to join diagnostic records. [OpenTelemetry common attribute specification](https://opentelemetry.io/docs/specs/otel/common/); [OpenTelemetry tracing SDK specification](https://opentelemetry.io/docs/specs/otel/trace/sdk/).

The proposed investigation of attribute truncation identity collision is not an executed deployment benchmark. Related reading: [Provider metric cardinality: request IDs do not belong in labels](/journal/provider-metric-cardinality-budget/); [Model aliases and revisions: provider response identity](/journal/provider-model-alias-revision-identity/).
