Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

redryerye
Copy link

@redryerye redryerye commented Jun 7, 2025

This PR

  • Adds option to add basic info as context

Notes

As a user of the SDK, I would like to have a default option in the SDK to add basic attributes (OS info, device info, locale, app info), similar to what Confidence provides.
The changes are mostly based on their implementation.

Since the SDK is targeted to iOS, I believe it would be useful to offer this option :)

How to test

You can add attributes with

let attributes = DeviceInfoAttributeDecorator(
        withDeviceInfo: true,
        withAppInfo: true,
        withOsInfo: true,
        withLocale: true
).decorated(attributes: [:])
let context = MutableContext(attributes: attributes)

Signed-off-by: Yuki Yamamoto <[email protected]>
@redryerye redryerye force-pushed the feat/device-info-decorator branch from 7e16039 to 7d9f835 Compare June 7, 2025 09:12
@beeme1mr
Copy link
Member

beeme1mr commented Jun 9, 2025

Hey @redryerye, thanks for the PR. I think this is a good idea but we should probably align the attribute names so they can be consistently implemented. FYI @open-feature/technical-steering-committee

@redryerye
Copy link
Author

Hey @redryerye, thanks for the PR. I think this is a good idea but we should probably align the attribute names so they can be consistently implemented. FYI @open-feature/technical-steering-committee

Let me know if there is anything I can help with.

@beeme1mr
Copy link
Member

Let me know if there is anything I can help with.

No, not at the moment. I brought this up in today's Governance meeting, and we all felt like this is a good idea. The main concern is standardizing context attribute naming. We're going to evaluate Segment and OTel to see where there are overlaps. By the looks of it, this PR aligns with Segment's structure.

@beeme1mr
Copy link
Member

@nicklasl, how did Confidence define these attribute names?

@nicklasl
Copy link
Member

nicklasl commented Aug 6, 2025

@nicklasl, how did Confidence define these attribute names?

Sorry about missing this ping.
There is not much thinking about them. We felt it make sense to group these in different structs and the naming makes somewhat sense on both Android and iOS.

If we (OF) do a bigger workthrough on the naming, I'm sure we'll align the internal Confidence implementations as well for consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants