-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(flags): Add flags context #4458
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add documentation for all types and fields. This is not just internal but also used to generate our official event schema, having these fields documented doesn't just help Relay development but also SDK developers.
@Dav1dde Added documentation and integration test coverage. |
@Dav1dde While writing the coverage for a malformed flags context I noticed relay doesn't reject the envelope but instead forwards the flags context as an empty object (aside from the type key). Is this intentional behavior so we reject fewer envelopes? |
So relay should just forward all contexts it does not know untouched but PII scrubbed. This variant of the enum is supposed to ensure this: /// Additional arbitrary fields for forwards compatibility.
#[metastructure(fallback_variant)]
Other(#[metastructure(pii = "true")] Object<Value>), If that is not the case (turned into an empty object) and you have a testcase to repro, please open a new issue/bug and we'll have to fix that. That should definitely not be the case. If you mean in the /// Additional arbitrary fields for forwards compatibility.
#[metastructure(additional_properties, retain = true, pii = "maybe")]
pub other: Object<Value>, Good catch, I missed that, we probably should have that on every struct in the context (well up to you, it's forward compatibility). |
Nice thanks, that stuff is really helpful not just for testing but also potential regressions. |
Adds a new feature context. The goal is to normalize contexts with the key "flags" and the body:
Where result is any valid JSON value.