fastlane-plugin-sentry_api 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2d7e86861535827a08cfc5f104e19fc76aa7425ce1145eb423bd2245c3ca4f4
|
|
4
|
+
data.tar.gz: fb60b07c170ecbeec59c94b79e50486764baeefac2c350b682e92fc474574bc2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b5dce5c216e5a457fe1422aef19ed565706df708157f75fda3159a702076001051496a0aafee13966f5113d8d07c6093369d7703d0a5b959b05e7e7f87df4dd
|
|
7
|
+
data.tar.gz: c6bf3a529b30953e46a1728e73d35fb0e7462a519f0fe527fd208b391098c8bc0f68bae736a8e914e4d70513c85ab75017dbbc4716ef78b13321f307769e634c
|
data/README.md
CHANGED
|
@@ -162,6 +162,7 @@ Query TTID (Time to Initial Display) percentiles per screen from the Sentry Even
|
|
|
162
162
|
| `per_page` | `Integer` | No | `20` | Number of screens to return (max 100) |
|
|
163
163
|
| `sort` | `String` | No | `-count()` | Sort order |
|
|
164
164
|
| `include_overall` | `Boolean` | No | `false` | Also fetch overall/aggregate TTID percentiles across all screens |
|
|
165
|
+
| `ttid_exclude_screens` | `Array` | No | `[]` | Array of screen (transaction) names to exclude from TTID queries |
|
|
165
166
|
|
|
166
167
|
**Output (SharedValues):** `SENTRY_TTID_DATA` (array of `{ transaction:, p50:, p75:, p95:, count: }`), `SENTRY_TTID_OVERALL` (hash with `{ p50:, p75:, p95:, count: }` when `include_overall` is true), `SENTRY_TTID_STATUS_CODE`, `SENTRY_TTID_JSON`
|
|
167
168
|
|
|
@@ -187,6 +188,13 @@ sentry_ttid_percentiles(
|
|
|
187
188
|
start_date: "2026-02-24T00:00:00Z",
|
|
188
189
|
end_date: "2026-03-03T00:00:00Z"
|
|
189
190
|
)
|
|
191
|
+
|
|
192
|
+
# Exclude specific screens (e.g. container or splash screens that inflate TTID)
|
|
193
|
+
sentry_ttid_percentiles(
|
|
194
|
+
stats_period: "7d",
|
|
195
|
+
include_overall: true,
|
|
196
|
+
ttid_exclude_screens: ["AppContainerViewController", "SplashScreenViewController"]
|
|
197
|
+
)
|
|
190
198
|
```
|
|
191
199
|
|
|
192
200
|
---
|
|
@@ -304,6 +312,7 @@ Includes target checking with ✅/⚠️ indicators and optional JSON file outpu
|
|
|
304
312
|
| `issue_count` | `Integer` | No | `10` | Number of top issues per release |
|
|
305
313
|
| `crash_issue_count` | `Integer` | No | `5` | Number of top crash (unhandled error) issues to include |
|
|
306
314
|
| `crash_query` | `String` | No | `is:unresolved issue.category:error error.unhandled:true` | Custom Sentry search query for top crash issues |
|
|
315
|
+
| `ttid_exclude_screens` | `Array` | No | `[]` | Array of screen (transaction) names to exclude from TTID queries |
|
|
307
316
|
| `output_json` | `String` | No | — | Path to write JSON report file |
|
|
308
317
|
|
|
309
318
|
**Output (SharedValues):** `SENTRY_SLO_REPORT` (complete hash with `:availability`, `:latency`, `:issues`)
|
|
@@ -357,6 +366,13 @@ report = sentry_slo_report(
|
|
|
357
366
|
)
|
|
358
367
|
rate = report[:availability][:current][:crash_free_session_rate]
|
|
359
368
|
UI.important("Crash-free: #{(rate * 100).round(2)}%")
|
|
369
|
+
|
|
370
|
+
# Exclude specific screens from TTID metrics
|
|
371
|
+
sentry_slo_report(
|
|
372
|
+
crash_free_target: 0.998,
|
|
373
|
+
ttid_exclude_screens: ["AppContainerViewController", "SplashScreenViewController"],
|
|
374
|
+
output_json: "slo_report.json"
|
|
375
|
+
)
|
|
360
376
|
```
|
|
361
377
|
|
|
362
378
|
---
|
|
@@ -76,14 +76,16 @@ module Fastlane
|
|
|
76
76
|
report[:latency][:current] = fetch_ttid(
|
|
77
77
|
auth_token: auth_token, org_slug: org_slug, project_id: project_id,
|
|
78
78
|
environment: environment, stats_period: stats_period,
|
|
79
|
-
per_page: params[:ttid_screen_count]
|
|
79
|
+
per_page: params[:ttid_screen_count],
|
|
80
|
+
exclude_screens: params[:ttid_exclude_screens]
|
|
80
81
|
)
|
|
81
82
|
log_ttid("Current #{stats_period}", report[:latency][:current], params[:ttid_p95_target_ms])
|
|
82
83
|
|
|
83
84
|
# Overall/aggregate TTID
|
|
84
85
|
report[:latency][:overall] = fetch_ttid_overall(
|
|
85
86
|
auth_token: auth_token, org_slug: org_slug, project_id: project_id,
|
|
86
|
-
environment: environment, stats_period: stats_period
|
|
87
|
+
environment: environment, stats_period: stats_period,
|
|
88
|
+
exclude_screens: params[:ttid_exclude_screens]
|
|
87
89
|
)
|
|
88
90
|
log_ttid_overall("Current #{stats_period}", report[:latency][:overall], params[:ttid_p95_target_ms])
|
|
89
91
|
|
|
@@ -93,14 +95,16 @@ module Fastlane
|
|
|
93
95
|
auth_token: auth_token, org_slug: org_slug, project_id: project_id,
|
|
94
96
|
environment: environment,
|
|
95
97
|
start_date: prev_dates[:start], end_date: prev_dates[:end],
|
|
96
|
-
per_page: params[:ttid_screen_count]
|
|
98
|
+
per_page: params[:ttid_screen_count],
|
|
99
|
+
exclude_screens: params[:ttid_exclude_screens]
|
|
97
100
|
)
|
|
98
101
|
log_ttid("Previous #{stats_period}", report[:latency][:previous], params[:ttid_p95_target_ms])
|
|
99
102
|
|
|
100
103
|
report[:latency][:overall_previous] = fetch_ttid_overall(
|
|
101
104
|
auth_token: auth_token, org_slug: org_slug, project_id: project_id,
|
|
102
105
|
environment: environment,
|
|
103
|
-
start_date: prev_dates[:start], end_date: prev_dates[:end]
|
|
106
|
+
start_date: prev_dates[:start], end_date: prev_dates[:end],
|
|
107
|
+
exclude_screens: params[:ttid_exclude_screens]
|
|
104
108
|
)
|
|
105
109
|
log_ttid_overall("Previous #{stats_period}", report[:latency][:overall_previous], params[:ttid_p95_target_ms])
|
|
106
110
|
end
|
|
@@ -292,6 +296,11 @@ module Fastlane
|
|
|
292
296
|
optional: true,
|
|
293
297
|
default_value: "is:unresolved issue.category:error error.unhandled:true",
|
|
294
298
|
type: String),
|
|
299
|
+
FastlaneCore::ConfigItem.new(key: :ttid_exclude_screens,
|
|
300
|
+
description: "Array of screen (transaction) names to exclude from TTID queries",
|
|
301
|
+
optional: true,
|
|
302
|
+
default_value: [],
|
|
303
|
+
type: Array),
|
|
295
304
|
# ── Output ──
|
|
296
305
|
FastlaneCore::ConfigItem.new(key: :output_json,
|
|
297
306
|
description: "Path to write JSON report file (optional)",
|
|
@@ -333,7 +342,14 @@ module Fastlane
|
|
|
333
342
|
compare_releases: false
|
|
334
343
|
)
|
|
335
344
|
rate = report[:availability][:current][:crash_free_session_rate]
|
|
336
|
-
UI.important("Crash-free: #{(rate * 100).round(2)}%")'
|
|
345
|
+
UI.important("Crash-free: #{(rate * 100).round(2)}%")',
|
|
346
|
+
|
|
347
|
+
'# Exclude specific screens from TTID metrics
|
|
348
|
+
sentry_slo_report(
|
|
349
|
+
crash_free_target: 0.998,
|
|
350
|
+
ttid_exclude_screens: ["AppContainerViewController", "SplashScreenViewController"],
|
|
351
|
+
output_json: "slo_report.json"
|
|
352
|
+
)'
|
|
337
353
|
]
|
|
338
354
|
end
|
|
339
355
|
|
|
@@ -413,7 +429,7 @@ module Fastlane
|
|
|
413
429
|
end
|
|
414
430
|
end
|
|
415
431
|
|
|
416
|
-
def fetch_ttid(auth_token:, org_slug:, project_id:, environment:, stats_period: nil, start_date: nil, end_date: nil, per_page: 10)
|
|
432
|
+
def fetch_ttid(auth_token:, org_slug:, project_id:, environment:, stats_period: nil, start_date: nil, end_date: nil, per_page: 10, exclude_screens: [])
|
|
417
433
|
fields = [
|
|
418
434
|
'transaction',
|
|
419
435
|
'avg(measurements.time_to_initial_display)',
|
|
@@ -427,7 +443,7 @@ module Fastlane
|
|
|
427
443
|
dataset: 'metrics',
|
|
428
444
|
field: fields,
|
|
429
445
|
project: project_id.to_s,
|
|
430
|
-
query:
|
|
446
|
+
query: ttid_query(exclude_screens),
|
|
431
447
|
sort: '-count()',
|
|
432
448
|
per_page: per_page.to_s
|
|
433
449
|
}
|
|
@@ -461,7 +477,7 @@ module Fastlane
|
|
|
461
477
|
end
|
|
462
478
|
end
|
|
463
479
|
|
|
464
|
-
def fetch_ttid_overall(auth_token:, org_slug:, project_id:, environment:, stats_period: nil, start_date: nil, end_date: nil)
|
|
480
|
+
def fetch_ttid_overall(auth_token:, org_slug:, project_id:, environment:, stats_period: nil, start_date: nil, end_date: nil, exclude_screens: [])
|
|
465
481
|
fields = [
|
|
466
482
|
'avg(measurements.time_to_initial_display)',
|
|
467
483
|
'p50(measurements.time_to_initial_display)',
|
|
@@ -474,7 +490,7 @@ module Fastlane
|
|
|
474
490
|
dataset: 'metrics',
|
|
475
491
|
field: fields,
|
|
476
492
|
project: project_id.to_s,
|
|
477
|
-
query:
|
|
493
|
+
query: ttid_query(exclude_screens),
|
|
478
494
|
per_page: '1'
|
|
479
495
|
}
|
|
480
496
|
|
|
@@ -679,6 +695,14 @@ module Fastlane
|
|
|
679
695
|
{ avg: nil, p50: nil, p75: nil, p95: nil, count: nil }
|
|
680
696
|
end
|
|
681
697
|
|
|
698
|
+
def ttid_query(exclude_screens)
|
|
699
|
+
parts = ['event.type:transaction transaction.op:ui.load']
|
|
700
|
+
(exclude_screens || []).each do |screen|
|
|
701
|
+
parts << "!transaction:#{screen}"
|
|
702
|
+
end
|
|
703
|
+
parts.join(' ')
|
|
704
|
+
end
|
|
705
|
+
|
|
682
706
|
def round_ms(value)
|
|
683
707
|
return nil if value.nil?
|
|
684
708
|
|
|
@@ -160,7 +160,12 @@ module Fastlane
|
|
|
160
160
|
description: "Also fetch overall/aggregate TTID percentiles across all screens",
|
|
161
161
|
optional: true,
|
|
162
162
|
default_value: false,
|
|
163
|
-
type: Fastlane::Boolean)
|
|
163
|
+
type: Fastlane::Boolean),
|
|
164
|
+
FastlaneCore::ConfigItem.new(key: :ttid_exclude_screens,
|
|
165
|
+
description: "Array of screen (transaction) names to exclude from TTID queries",
|
|
166
|
+
optional: true,
|
|
167
|
+
default_value: [],
|
|
168
|
+
type: Array)
|
|
164
169
|
]
|
|
165
170
|
end
|
|
166
171
|
|
|
@@ -220,6 +225,9 @@ module Fastlane
|
|
|
220
225
|
query_parts = ["event.type:transaction"]
|
|
221
226
|
query_parts << "transaction.op:#{params[:transaction_op]}" if params[:transaction_op]
|
|
222
227
|
query_parts << "release:#{params[:release]}" if params[:release]
|
|
228
|
+
(params[:ttid_exclude_screens] || []).each do |screen|
|
|
229
|
+
query_parts << "!transaction:#{screen}"
|
|
230
|
+
end
|
|
223
231
|
|
|
224
232
|
query_params = {
|
|
225
233
|
dataset: 'metrics',
|
|
@@ -253,6 +261,9 @@ module Fastlane
|
|
|
253
261
|
query_parts = ['event.type:transaction']
|
|
254
262
|
query_parts << "transaction.op:#{params[:transaction_op]}" if params[:transaction_op]
|
|
255
263
|
query_parts << "release:#{params[:release]}" if params[:release]
|
|
264
|
+
(params[:ttid_exclude_screens] || []).each do |screen|
|
|
265
|
+
query_parts << "!transaction:#{screen}"
|
|
266
|
+
end
|
|
256
267
|
|
|
257
268
|
query_params = {
|
|
258
269
|
dataset: 'metrics',
|