Changed
- Redaction no longer modifies the span.
LatitudeSpanProcessorused to mask span, event and link
attributes in place on the shared span object, so every other processor and exporter on the same
provider also got Latitude's masked values. It now redacts an export-time view (the same pattern
as the cost view), so other processors see the raw span. Configure their redaction separately.
RedactThenExportSpanProcessorwith aRedactSpanProcessoralso redacts a view now. A
RedactSpanProcessorregistered directly on a provider still masks in place, because that is the
only way a bare processor can affect what later processors export. - Regex redaction patterns no longer mask the attributes Latitude needs to classify, attribute and
price a span:gen_ai.operation.name,openinference.span.kind,llm.request.type,
ai.operationId,latitude.span.kind,span.type,gen_ai.provider.name,gen_ai.system,
gen_ai.model.provider,llm.system,llm.provider,ai.model.provider,
gen_ai.request.model,gen_ai.response.model,llm.model_name,embedding.model_name,
reranker.model_name,ai.model.idandai.response.model. A broad pattern such as
/^gen_ai\./or/.*/used to mask them, so Latitude dropped the span from cost and usage
rollups and lost its model attribution. Listing one as an exact string still redacts it. - Redaction never throws: a
maskthat throws or returns a non-attribute value masks that value
with******, and the span is still exported. Cost is still resolved from the unredacted span, and
the SDK's own cost attributes are written after redaction, so patterns never mask them. A
RedactSpanProcessorregistered directly on a provider also fails closed in place (span, event
and link attributes).
Fixed
- A regex pattern with the
goryflag no longer skips every other matching attribute.
Patterns are matched withString.prototype.search, which ignoreslastIndex. RedactSpanProcessorno longer writes its defaultmaskinto the options object it was given.
Added
DEFAULT_REDACT_PATTERNSandREDACTION_EXEMPT_ATTRIBUTESexports, so a customredactcan keep
the defaults (attributes: [...DEFAULT_REDACT_PATTERNS, ...]). A customredactstill replaces
the defaults rather than adding to them. NewATTRIBUTESkeys for the exempt attributes.- A "Redaction" section in the TypeScript telemetry docs.