Skip to content

feat(observability): add redaction support for embedding span attributes #85

@coderabbitai

Description

@coderabbitai

Summary

Currently, the embeddings tracing span emits full embedding vectors and serialized response payloads as span attributes (e.g., output.value, embedding.embeddings.{index}.embedding.vector). While this conforms to the OpenInference/OpenTelemetry specification, it can result in very large span payloads for high-dimension or batched embeddings, risking dropped traces and high telemetry overhead.

Redaction support should be added to allow users to optionally suppress or truncate these large attributes (e.g., replace full vectors with compact metadata such as count and dimension).

Context

Acceptance Criteria

  • Provide a redaction/filtering mechanism for span attributes that contain large payloads (e.g., output.value, embedding.embeddings.{index}.embedding.vector)
  • Ensure the default behavior still conforms to the specification
  • Allow users/operators to opt in to compact metadata output (e.g., counts/dimensions only)

/cc @bzp2010

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions