fastlane-plugin-sentry_api 0.2.0 → 0.3.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: d77dd2a4ddeeeebbae493992d767270bbb900115a8609b569da69c3fe289097f
|
|
4
|
+
data.tar.gz: 9d5cd96f9c4122c36b1046f2d35a9ea52128ec72ec3ad6b89f2d75161e7da929
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6710416b679ef754a02c988f66f8c982f8067539670214fd124acebaedd236aee4b3ddcba82fa523f1385f7f6b589bdbf3cdbccac55b8c22d3b558ef7d99b55b
|
|
7
|
+
data.tar.gz: 35cea7b42c2aecbf03b0afef2995f43e1596cc77527bb6983c390af085037f6f0aee86b239380977c1aa540c195df83b74b1d0d0696ba889097b1674096ac883
|
data/README.md
CHANGED
|
@@ -163,7 +163,7 @@ Query TTID (Time to Initial Display) percentiles per screen from the Sentry Even
|
|
|
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
165
|
|
|
166
|
-
**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)
|
|
166
|
+
**Output (SharedValues):** `SENTRY_TTID_DATA` (array of `{ transaction:, avg:, p50:, p75:, p95:, count: }`), `SENTRY_TTID_OVERALL` (hash with `{ avg:, p50:, p75:, p95:, count: }` when `include_overall` is true)
|
|
167
167
|
|
|
168
168
|
**Examples:**
|
|
169
169
|
|
|
@@ -171,7 +171,7 @@ Query TTID (Time to Initial Display) percentiles per screen from the Sentry Even
|
|
|
171
171
|
# Top 10 screens by load count
|
|
172
172
|
screens = sentry_ttid_percentiles(stats_period: "7d", per_page: 10)
|
|
173
173
|
screens.each do |s|
|
|
174
|
-
UI.message("#{s[:transaction]}: p50=#{s[:p50]}ms p95=#{s[:p95]}ms (#{s[:count]} loads)")
|
|
174
|
+
UI.message("#{s[:transaction]}: avg=#{s[:avg]}ms p50=#{s[:p50]}ms p95=#{s[:p95]}ms (#{s[:count]} loads)")
|
|
175
175
|
end
|
|
176
176
|
|
|
177
177
|
# With overall aggregate TTID
|
|
@@ -309,7 +309,7 @@ Includes target checking with ✅/⚠️ indicators and optional JSON file outpu
|
|
|
309
309
|
|
|
310
310
|
The `:latency` section includes:
|
|
311
311
|
- `:current` — array of per-screen TTID data
|
|
312
|
-
- `:overall` — aggregate TTID `{ p50:, p75:, p95:, count: }` across all screens
|
|
312
|
+
- `:overall` — aggregate TTID `{ avg:, p50:, p75:, p95:, count: }` across all screens
|
|
313
313
|
- `:app_launch` — `{ cold: { p50:, p75:, p95:, count: }, warm: { ... } }`
|
|
314
314
|
- `:previous`, `:overall_previous`, `:app_launch_previous` — week-over-week counterparts (when `compare_weeks` is true)
|
|
315
315
|
|
|
@@ -338,7 +338,7 @@ report = lane_context[SharedValues::SENTRY_SLO_REPORT]
|
|
|
338
338
|
|
|
339
339
|
# Overall TTID
|
|
340
340
|
overall = report[:latency][:overall]
|
|
341
|
-
UI.message("Overall TTID p95: #{overall[:p95]}ms")
|
|
341
|
+
UI.message("Overall TTID avg: #{overall[:avg]}ms p95: #{overall[:p95]}ms")
|
|
342
342
|
|
|
343
343
|
# App launch
|
|
344
344
|
cold = report[:latency][:app_launch][:cold]
|
|
@@ -375,11 +375,11 @@ end
|
|
|
375
375
|
lane :ttid_check do
|
|
376
376
|
screens = sentry_ttid_percentiles(stats_period: "7d", per_page: 10, include_overall: true)
|
|
377
377
|
screens.each do |s|
|
|
378
|
-
UI.message("#{s[:transaction]}: p50=#{s[:p50]}ms p95=#{s[:p95]}ms (#{s[:count]} loads)")
|
|
378
|
+
UI.message("#{s[:transaction]}: avg=#{s[:avg]}ms p50=#{s[:p50]}ms p95=#{s[:p95]}ms (#{s[:count]} loads)")
|
|
379
379
|
end
|
|
380
380
|
|
|
381
381
|
overall = lane_context[SharedValues::SENTRY_TTID_OVERALL]
|
|
382
|
-
UI.important("Overall TTID: p50=#{overall[:p50]}ms p95=#{overall[:p95]}ms") if overall
|
|
382
|
+
UI.important("Overall TTID: avg=#{overall[:avg]}ms p50=#{overall[:p50]}ms p95=#{overall[:p95]}ms") if overall
|
|
383
383
|
end
|
|
384
384
|
|
|
385
385
|
lane :app_launch_check do
|
|
@@ -410,6 +410,7 @@ module Fastlane
|
|
|
410
410
|
def fetch_ttid(auth_token:, org_slug:, project_id:, environment:, stats_period: nil, start_date: nil, end_date: nil, per_page: 10)
|
|
411
411
|
fields = [
|
|
412
412
|
'transaction',
|
|
413
|
+
'avg(measurements.time_to_initial_display)',
|
|
413
414
|
'p50(measurements.time_to_initial_display)',
|
|
414
415
|
'p75(measurements.time_to_initial_display)',
|
|
415
416
|
'p95(measurements.time_to_initial_display)',
|
|
@@ -445,6 +446,7 @@ module Fastlane
|
|
|
445
446
|
data.map do |row|
|
|
446
447
|
{
|
|
447
448
|
transaction: row['transaction'],
|
|
449
|
+
avg: round_ms(row['avg(measurements.time_to_initial_display)']),
|
|
448
450
|
p50: round_ms(row['p50(measurements.time_to_initial_display)']),
|
|
449
451
|
p75: round_ms(row['p75(measurements.time_to_initial_display)']),
|
|
450
452
|
p95: round_ms(row['p95(measurements.time_to_initial_display)']),
|
|
@@ -455,6 +457,7 @@ module Fastlane
|
|
|
455
457
|
|
|
456
458
|
def fetch_ttid_overall(auth_token:, org_slug:, project_id:, environment:, stats_period: nil, start_date: nil, end_date: nil)
|
|
457
459
|
fields = [
|
|
460
|
+
'avg(measurements.time_to_initial_display)',
|
|
458
461
|
'p50(measurements.time_to_initial_display)',
|
|
459
462
|
'p75(measurements.time_to_initial_display)',
|
|
460
463
|
'p95(measurements.time_to_initial_display)',
|
|
@@ -487,6 +490,7 @@ module Fastlane
|
|
|
487
490
|
|
|
488
491
|
row = response[:json]&.dig('data', 0) || {}
|
|
489
492
|
{
|
|
493
|
+
avg: round_ms(row['avg(measurements.time_to_initial_display)']),
|
|
490
494
|
p50: round_ms(row['p50(measurements.time_to_initial_display)']),
|
|
491
495
|
p75: round_ms(row['p75(measurements.time_to_initial_display)']),
|
|
492
496
|
p95: round_ms(row['p95(measurements.time_to_initial_display)']),
|
|
@@ -666,7 +670,7 @@ module Fastlane
|
|
|
666
670
|
end
|
|
667
671
|
|
|
668
672
|
def empty_ttid_overall
|
|
669
|
-
{ p50: nil, p75: nil, p95: nil, count: nil }
|
|
673
|
+
{ avg: nil, p50: nil, p75: nil, p95: nil, count: nil }
|
|
670
674
|
end
|
|
671
675
|
|
|
672
676
|
def round_ms(value)
|
|
@@ -815,19 +819,8 @@ module Fastlane
|
|
|
815
819
|
cold = app_launch[:cold]
|
|
816
820
|
warm = app_launch[:warm]
|
|
817
821
|
launch_target = params[:app_launch_p95_target_ms]
|
|
818
|
-
|
|
819
|
-
if
|
|
820
|
-
indicator = if launch_target
|
|
821
|
-
cold[:p95] <= launch_target ? "✅" : "⚠️"
|
|
822
|
-
else
|
|
823
|
-
""
|
|
824
|
-
end
|
|
825
|
-
UI.message("Cold start p95: #{cold[:p95]}ms #{indicator} (target: #{launch_target}ms)")
|
|
826
|
-
end
|
|
827
|
-
|
|
828
|
-
if warm && warm[:p95]
|
|
829
|
-
UI.message("Warm start p95: #{warm[:p95]}ms")
|
|
830
|
-
end
|
|
822
|
+
log_cold_start(cold, launch_target)
|
|
823
|
+
UI.message("Warm start p95: #{warm[:p95]}ms") if warm && warm[:p95]
|
|
831
824
|
end
|
|
832
825
|
|
|
833
826
|
# Top Crash Issues
|
|
@@ -852,6 +845,19 @@ module Fastlane
|
|
|
852
845
|
UI.success("SLO report generated at #{report[:generated_at]}")
|
|
853
846
|
end
|
|
854
847
|
|
|
848
|
+
def log_cold_start(cold, launch_target)
|
|
849
|
+
return unless cold && cold[:p95]
|
|
850
|
+
|
|
851
|
+
indicator = target_indicator(cold[:p95], launch_target)
|
|
852
|
+
UI.message("Cold start p95: #{cold[:p95]}ms #{indicator} (target: #{launch_target}ms)")
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
def target_indicator(value, target)
|
|
856
|
+
return "" unless target
|
|
857
|
+
|
|
858
|
+
value <= target ? "✅" : "⚠️"
|
|
859
|
+
end
|
|
860
|
+
|
|
855
861
|
def format_pct(value)
|
|
856
862
|
return "N/A" if value.nil?
|
|
857
863
|
|