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

Collect slow and frozen frames as measurements #3155

Merged

Conversation

markushi
Copy link
Member

@markushi markushi commented Jan 22, 2024

📜 Description

Similar to

final MeasurementValue tfValues =
new MeasurementValue(frameCounts.totalFrames, MeasurementUnit.NONE);
final MeasurementValue sfValues =
new MeasurementValue(frameCounts.slowFrames, MeasurementUnit.NONE);
final MeasurementValue ffValues =
new MeasurementValue(frameCounts.frozenFrames, MeasurementUnit.NONE);
final Map<String, @NotNull MeasurementValue> measurements = new HashMap<>();
measurements.put(MeasurementValue.KEY_FRAMES_TOTAL, tfValues);
measurements.put(MeasurementValue.KEY_FRAMES_SLOW, sfValues);
measurements.put(MeasurementValue.KEY_FRAMES_FROZEN, ffValues);
activityMeasurements.put(transactionId, measurements);
we want to report slow and frozen frame count for transactions, just like we had before.

💡 Motivation and Context

#skip-changelog

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

github-actions bot commented Jan 22, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against a7ebfa3

Copy link
Contributor

github-actions bot commented Jan 22, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 403.58 ms 481.79 ms 78.21 ms
Size 1.70 MiB 2.27 MiB 584.65 KiB

Baseline results on branch: feat/continuous-perf-collectors

Startup times

Revision Plain With Sentry Diff
5344734 417.38 ms 478.70 ms 61.32 ms
08b5e20 379.47 ms 438.79 ms 59.32 ms
7b303a4 381.72 ms 445.56 ms 63.84 ms
243f1a4 405.48 ms 474.32 ms 68.84 ms
a5e1504 379.98 ms 463.29 ms 83.31 ms
bcb9633 443.16 ms 544.86 ms 101.70 ms

App size

Revision Plain With Sentry Diff
5344734 1.72 MiB 2.27 MiB 558.34 KiB
08b5e20 1.70 MiB 2.27 MiB 584.58 KiB
7b303a4 1.72 MiB 2.27 MiB 558.34 KiB
243f1a4 1.72 MiB 2.27 MiB 558.42 KiB
a5e1504 1.72 MiB 2.27 MiB 558.86 KiB
bcb9633 1.70 MiB 2.27 MiB 584.62 KiB

Previous results on branch: feat/slow-frozen-frames-measurements

Startup times

Revision Plain With Sentry Diff
7cd35fc 426.60 ms 499.51 ms 72.91 ms

App size

Revision Plain With Sentry Diff
7cd35fc 1.70 MiB 2.27 MiB 584.54 KiB

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So spans do not support explicit measurements (not from the data bag) yet? It's gonna be available with only-spans, right?

* Interpolate total frame count to match span duration

* Update Changelog
@markushi
Copy link
Member Author

So spans do not support explicit measurements (not from the data bag) yet? It's gonna be available with only-spans, right?

It looks like it's actually possible, but as far as I can see no SDK has it implemented yet => getsentry/team-mobile#172

@markushi markushi merged commit 533109e into feat/continuous-perf-collectors Jan 24, 2024
17 checks passed
@markushi markushi deleted the feat/slow-frozen-frames-measurements branch January 24, 2024 18:38
markushi added a commit that referenced this pull request Jan 25, 2024
* Extend performance collector APIs

* Update changelog

* Update changelog

* Collect slow and frozen frames for spans (#3111)

* Collect slow and frozen frames using SentryFrameMetricsCollector and SpanFrameMetricsCollector

* Rename fast frame to normal frame, remove fastFrameDuration

* Extend performance collector APIs

* Update changelog

* Collect slow and frozen frames using SentryFrameMetricsCollector and SpanFrameMetricsCollector

* Rename fast frame to normal frame, remove fastFrameDuration

* Fix PR feedback

* Fix nullability and remove unused field

* Rename FrameMetrics to SentryFrameMetrics

* Collect delay instead of total duration

* Fix tests

* Revert "Fix tests"

This reverts commit 5b9c3c6.

* Properly fix tests

* Collect slow and frozen frames as measurements (#3155)

* Ensure slow and frozen frames values are reported as measurement values as well

* Interpolate total frame count to match span duration (#3158)

* Interpolate total frame count to match span duration

* Update Changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants