Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/sentry/interfaces/contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ class AppContextType(ContextType):
@contexttype
class DeviceContextType(ContextType):
type = "device"
context_to_tag_mapping = {"": "{model}", "family": "{family}"}
context_to_tag_mapping = {
"": "{model}",
"family": "{family}",
"device_type": "{device_type}",
}
# model_id, arch


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ errors: null
tags:
- - device
- iPad
- - device.device_type
- Handheld
to_json:
device:
arch: arm64
device_type: Handheld
model: iPad
model_id: 1234AB
name: My iPad
Expand Down
1 change: 1 addition & 0 deletions tests/sentry/event_manager/interfaces/test_contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def test_device(make_ctx_snapshot) -> None:
"model_id": "1234AB",
"version": "1.2.3",
"arch": "arm64",
"device_type": "Handheld",
}
}
)
Expand Down
Loading