Repository navigation
Conversation
…ibutes _meta.redactedAttributes holds attribute references. The SDK wrote the literal name of a redacted top-level attribute, so a private attribute named "/a" was reported as "/a", which LaunchDarkly reads as a reference to an attribute named "a". The name is now written as "/~1a".
3 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
_meta.redactedAttributesin analytics events holds attribute references. When a top-level attribute was redacted, the SDK wrote its literal name. A private attribute named/awas reported as/a, which LaunchDarkly reads as a reference to an attribute nameda. The SDK now writes the escaped reference,/~1a. This applies to per-context and global private attributes and toall_attributes_private. The redaction itself was already correct.The v2 contract tests for private attribute names that look like references now pass.
Note
Overview
Fixes
_meta.redactedAttributesfor top-level private attributes: the serializer now recordsAttributeReference::fromLiteral($attr)->getPath()instead of the raw attribute name when a whole attribute is redacted (all_attributes_private, per-context private attrs, or global private names at depth 1).That keeps names like
/aand/~xfrom being misread as JSON-pointer references (e.g./a→/~1a). Nested redaction paths were already using reference paths; only whole-attribute entries changed.New
EventSerializerTestcases cover private attributes with reference-like names andall_attributes_private.Reviewed by Cursor Bugbot for commit 772688c. Bugbot is set up for automated code reviews on this repo. Configure here.