-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat(attributes): Add device.low_power_mode attribute for iOS #314
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2469,6 +2469,26 @@ export const DEVICE_SIMULATOR = 'device.simulator'; | |
| */ | ||
| export type DEVICE_SIMULATOR_TYPE = boolean; | ||
|
|
||
| // Path: model/attributes/device/device__low_power_mode.json | ||
|
|
||
| /** | ||
| * Whether the device is in Low Power Mode. `device.low_power_mode` | ||
| * | ||
| * Attribute Value Type: `boolean` {@link DEVICE_LOW_POWER_MODE_TYPE} | ||
| * | ||
| * Contains PII: false | ||
| * | ||
| * Attribute defined in OTEL: No | ||
| * | ||
| * @example true | ||
| */ | ||
| export const DEVICE_LOW_POWER_MODE = 'device.low_power_mode'; | ||
|
|
||
| /** | ||
| * Type for {@link DEVICE_LOW_POWER_MODE} device.low_power_mode | ||
| */ | ||
| export type DEVICE_LOW_POWER_MODE_TYPE = boolean; | ||
|
|
||
| // Path: model/attributes/effectiveConnectionType.json | ||
|
|
||
| /** | ||
|
|
@@ -10333,6 +10353,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = { | |
| [DEVICE_MODEL_ID]: 'string', | ||
| [DEVICE_PROCESSOR_COUNT]: 'integer', | ||
| [DEVICE_SIMULATOR]: 'boolean', | ||
| [DEVICE_LOW_POWER_MODE]: 'boolean', | ||
| [EFFECTIVECONNECTIONTYPE]: 'string', | ||
| [ENVIRONMENT]: 'string', | ||
| [ERROR_TYPE]: 'string', | ||
|
|
@@ -10821,6 +10842,7 @@ export type AttributeName = | |
| | typeof DEVICE_MODEL_ID | ||
| | typeof DEVICE_PROCESSOR_COUNT | ||
| | typeof DEVICE_SIMULATOR | ||
| | typeof DEVICE_LOW_POWER_MODE | ||
| | typeof EFFECTIVECONNECTIONTYPE | ||
| | typeof ENVIRONMENT | ||
| | typeof ERROR_TYPE | ||
|
|
@@ -12703,6 +12725,17 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = { | |
| example: false, | ||
| changelog: [{ version: 'next', prs: [300], description: 'Added device.simulator attribute' }], | ||
| }, | ||
| [DEVICE_LOW_POWER_MODE]: { | ||
| brief: 'Whether the device is in Low Power Mode.', | ||
| type: 'boolean', | ||
| pii: { | ||
| isPii: 'false', | ||
| }, | ||
| isInOtel: false, | ||
| sdks: ['sentry.cocoa'], | ||
| example: true, | ||
| changelog: [{ version: 'next', description: 'Added device.low_power_mode attribute' }], | ||
| }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TypeScript Attributes type missing new attribute entryMedium Severity
Reviewed by Cursor Bugbot for commit f95b230. Configure here. |
||
| [EFFECTIVECONNECTIONTYPE]: { | ||
| brief: 'Specifies the estimated effective type of the current connection (e.g. slow-2g, 2g, 3g, 4g).', | ||
| type: 'string', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "key": "device.low_power_mode", | ||
| "brief": "Whether the device is in Low Power Mode.", | ||
| "type": "boolean", | ||
| "pii": { | ||
| "key": "false" | ||
| }, | ||
| "is_in_otel": false, | ||
| "sdks": ["sentry.cocoa"], | ||
| "example": true, | ||
| "changelog": [ | ||
| { | ||
| "version": "next", | ||
| "description": "Added device.low_power_mode attribute" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1526,6 +1526,16 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): | |
| Example: false | ||
| """ | ||
|
|
||
| # Path: model/attributes/device/device__low_power_mode.json | ||
| DEVICE_LOW_POWER_MODE: Literal["device.low_power_mode"] = "device.low_power_mode" | ||
| """Whether the device is in Low Power Mode. | ||
|
|
||
| Type: bool | ||
| Contains PII: false | ||
| Defined in OTEL: No | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The new attribute Suggested FixAdd the missing Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
| Example: true | ||
| """ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Python bindings missing metadata and TypedDict entriesHigh Severity The Reviewed by Cursor Bugbot for commit f95b230. Configure here. |
||
|
|
||
| # Path: model/attributes/deviceMemory.json | ||
| DEVICEMEMORY: Literal["deviceMemory"] = "deviceMemory" | ||
| """The estimated total memory capacity of the device, only a rough estimation in gigabytes. | ||
|
|
||


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.
New attribute placed in wrong alphabetical position
Low Severity
DEVICE_LOW_POWER_MODEis appended afterDEVICE_SIMULATORin every section (constant definitions,ATTRIBUTE_TYPE,AttributeName,ATTRIBUTE_METADATA, and PythonATTRIBUTE_NAMES), but the rest of the file maintains strict alphabetical order by constant name. SinceLsorts beforeM,P, andS, it belongs betweenDEVICE_FREE_MEMORYandDEVICE_MEMORY_ESTIMATED_CAPACITY. These are auto-generated files, so the next regeneration will move the entry and produce a noisy diff.Additional Locations (2)
javascript/sentry-conventions/src/attributes.ts#L10355-L10356python/src/sentry_conventions/attributes.py#L1528-L1537Reviewed by Cursor Bugbot for commit f95b230. Configure here.