Skip to content

Commit d2e9251

Browse files
feat(playstation): Set default sdk.name (#4802)
1 parent efc4452 commit d2e9251

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- Normalize AI data and measurements into new OTEL compatible fields and extracting metrics out of said fields. ([#4768](https://github.com/getsentry/relay/pull/4768))
2222
- Switch `sysinfo` dependency back to upstream and update to 0.35.1. ([#4776](https://github.com/getsentry/relay/pull/4776))
2323
- Consistently always emit session outcomes. ([#4798](https://github.com/getsentry/relay/pull/4798))
24+
- Set default sdk name for playstation crashes. ([#4802](https://github.com/getsentry/relay/pull/4802))
2425

2526
## 25.5.1
2627

relay-server/src/services/processor/playstation.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
use relay_config::Config;
66
use relay_dynamic_config::Feature;
77
use relay_event_schema::protocol::{
8-
AppContext, Context, Contexts, DeviceContext, LenientString, OsContext, RuntimeContext, Tags,
8+
AppContext, ClientSdkInfo, Context, Contexts, DeviceContext, LenientString, OsContext,
9+
RuntimeContext, Tags,
910
};
1011
use relay_event_schema::protocol::{Event, TagEntry};
1112
use relay_prosperoconv::{self, ProsperoDump};
@@ -268,6 +269,12 @@ fn merge_playstation_context(event: &mut Event, prospero: &ProsperoDump) {
268269
..Default::default()
269270
});
270271
}
272+
273+
event.client_sdk.get_or_insert_with(|| ClientSdkInfo {
274+
name: Annotated::new("sentry.playstation.devkit".to_owned()),
275+
version: Annotated::new("0.0.1".to_owned()),
276+
..Default::default()
277+
});
271278
}
272279

273280
fn infer_content_type(filename: &str) -> ContentType {

tests/integration/test_playstation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ def test_playstation_with_feature_flag(
145145
attachment["name"] for attachment in event["attachments"]
146146
]
147147

148+
assert event_data["sdk"]["name"] == "sentry.playstation.devkit"
149+
148150

149151
def test_playstation_user_data_extraction(
150152
mini_sentry,
@@ -278,6 +280,10 @@ def test_playstation_attachment(
278280
"event_id": "cbf6960622e14a45abc1f03b2055b186",
279281
"type": "error",
280282
"exception": {"values": [{"type": "ValueError", "value": "Should not happen"}]},
283+
"sdk": {
284+
"name": "sentry.native.playstation",
285+
"version": "0.1.0",
286+
},
281287
}
282288
envelope = Envelope()
283289
envelope.add_event(bogus_error)
@@ -342,6 +348,8 @@ def test_playstation_attachment(
342348
attachment["name"] for attachment in event["attachments"]
343349
]
344350

351+
assert event_data["sdk"]["name"] == "sentry.native.playstation"
352+
345353

346354
def test_playstation_attachment_no_feature_flag(
347355
mini_sentry,

0 commit comments

Comments
 (0)