Skip to content
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(app-start): Add process load span to mobile span ops #3227

Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Introduce generic filters in global configs. ([#3161](https://github.com/getsentry/relay/pull/3161))
- Individual cardinality limits can now be set into passive mode and not be enforced. ([#3199](https://github.com/getsentry/relay/pull/3199))
- Enable HTTP compression for all APIs. ([#3233](https://github.com/getsentry/relay/pull/3233))
- Add `process.load` span to ingested mobile span ops. ([#3227](https://github.com/getsentry/relay/pull/3227))


**Bug Fixes**:
Expand Down
1 change: 1 addition & 0 deletions relay-dynamic-config/src/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const MOBILE_OPS: &[&str] = &[
"app.*",
"application.load",
"contentprovider.load",
"process.load",
"ui.load*",
];

Expand Down
13 changes: 12 additions & 1 deletion relay-server/src/metrics_extraction/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,17 @@ mod tests {
"data": {
"app_start_type": "cold"
}
},
{
"op": "process.load",
"description": "Process Initialization",
"span_id": "bd429c44b67a3eb2",
"start_timestamp": 1597976300.0000000,
"timestamp": 1597976303.0000000,
"trace_id": "ff62a8b040f340bda5d830223def1d81",
"data": {
"app_start_type": "cold"
}
}
]
}
Expand Down Expand Up @@ -1233,7 +1244,7 @@ mod tests {
.filter(|b| b.name == "c:spans/usage@none")
.collect::<Vec<_>>();

let expected_usage = 7; // We count all spans received by Relay
let expected_usage = 8; // We count all spans received by Relay
assert_eq!(usage_metrics.len(), expected_usage);
for m in usage_metrics {
assert!(m.tags.is_empty());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,76 @@ expression: "(&event.value().unwrap().spans, metrics)"
platform: ~,
other: {},
},
Span {
timestamp: Timestamp(
2020-08-21T02:18:23Z,
),
start_timestamp: Timestamp(
2020-08-21T02:18:20Z,
),
exclusive_time: 3000.0,
description: "Process Initialization",
op: "process.load",
span_id: SpanId(
"bd429c44b67a3eb2",
),
parent_span_id: ~,
trace_id: TraceId(
"ff62a8b040f340bda5d830223def1d81",
),
segment_id: ~,
is_segment: ~,
status: ~,
tags: ~,
origin: ~,
profile_id: ~,
data: SpanData {
app_start_type: String(
"cold",
),
browser_name: ~,
code_filepath: ~,
code_lineno: ~,
code_function: ~,
code_namespace: ~,
db_operation: ~,
db_system: ~,
environment: ~,
http_decoded_response_content_length: ~,
http_request_method: ~,
http_response_content_length: ~,
http_response_transfer_size: ~,
resource_render_blocking_status: ~,
server_address: ~,
http_response_status_code: ~,
thread_name: ~,
transaction: ~,
ui_component_name: ~,
url_scheme: ~,
user: ~,
replay_id: ~,
other: {},
},
sentry_tags: {
"app_start_type": "cold",
"device.class": "1",
"mobile": "true",
"op": "process.load",
"os.name": "iOS",
"platform": "cocoa",
"release": "1.2.3",
"sdk.name": "sentry.javascript.react-native",
"sdk.version": "unknown",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"ttid": "ttid",
},
received: ~,
measurements: ~,
_metrics_summary: ~,
platform: ~,
other: {},
},
],
[
Bucket {
Expand Down Expand Up @@ -769,5 +839,64 @@ expression: "(&event.value().unwrap().spans, metrics)"
"transaction": "gEt /api/:version/users/",
},
},
Bucket {
timestamp: UnixTimestamp(1597976303),
width: 0,
name: "d:spans/exclusive_time@millisecond",
value: Distribution(
[
3000.0,
],
),
tags: {
"app_start_type": "cold",
"device.class": "1",
"os.name": "iOS",
"release": "1.2.3",
"span.op": "process.load",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"ttid": "ttid",
},
},
Bucket {
timestamp: UnixTimestamp(1597976303),
width: 0,
name: "d:spans/exclusive_time_light@millisecond",
value: Distribution(
[
3000.0,
],
),
tags: {
"device.class": "1",
"os.name": "iOS",
"release": "1.2.3",
"span.op": "process.load",
},
},
Bucket {
timestamp: UnixTimestamp(1597976303),
width: 0,
name: "c:spans/count_per_op@none",
value: Counter(
1.0,
),
tags: {
"span.op": "process.load",
},
},
Bucket {
timestamp: UnixTimestamp(1597976303),
width: 0,
name: "c:spans/count_per_segment@none",
value: Counter(
1.0,
),
tags: {
"release": "1.2.3",
"transaction": "gEt /api/:version/users/",
},
},
],
)
Loading