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

Send cpu usage percentage in profile payload #2469

Merged
merged 40 commits into from
Jan 25, 2023

Conversation

stefanosiano
Copy link
Member

📜 Description

added cpu usage percentage to profile payload

💡 Motivation and Context

We want to add more data to profiles, so we are including the cpu usage we get from transactions to profile payloads.
Also, at the moment there's no easy way to send the data in the transaction, due to transaction metrics not supporting lists of data. We want to have some data and eventually show it in the Sentry dashboard. The quickest way is to send them in the profiles.

💚 How did you test it?

Unit tests

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

Envelopes are currently not ingested, due to some missing support from relay. Waiting for it to catch up

stefanosiano and others added 25 commits December 28, 2022 17:54
…ndroid set in SentryOptions

Added TransactionPerformanceCollector to collect performance data while a transaction is running
# Conflicts:
#	CHANGELOG.md
#	sentry/src/main/java/io/sentry/SentryTracer.java
#	sentry/src/main/java/io/sentry/TransactionPerformanceCollector.java
#	sentry/src/test/java/io/sentry/TransactionPerformanceCollectorTest.kt
…running

TransactionPerformanceCollector now returns PerformanceCollectionData, which contains memory and cpu usage data
…emory-measurement

# Conflicts:
#	CHANGELOG.md
AndroidTransactionProfiler now gets an instance of PerformanceCollectionData instead of MemoryCollectionData
# Conflicts:
#	CHANGELOG.md
#	sentry/src/main/java/io/sentry/TransactionPerformanceCollector.java
# Conflicts:
#	CHANGELOG.md
#	sentry/src/main/java/io/sentry/TransactionPerformanceCollector.java
…emory-measurement

# Conflicts:
#	CHANGELOG.md
#	sentry/src/main/java/io/sentry/TransactionPerformanceCollector.java
@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2023

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

Generated by 🚫 dangerJS against 303efc3

@stefanosiano stefanosiano changed the title Add cpu usage percentage to profile payload Send cpu usage percentage in profile payload Jan 13, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 389.10 ms 476.98 ms 87.88 ms
Size 1.73 MiB 2.33 MiB 622.07 KiB

Previous results on branch: feat/android-profiles-cpu-measurement

Startup times

Revision Plain With Sentry Diff
9f4ba0f 336.71 ms 382.18 ms 45.47 ms

App size

Revision Plain With Sentry Diff
9f4ba0f 1.73 MiB 2.33 MiB 622.07 KiB

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Base: 80.13% // Head: 80.13% // No change to project coverage 👍

Coverage data is based on head (303efc3) compared to base (b049670).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2469   +/-   ##
=========================================
  Coverage     80.13%   80.13%           
  Complexity     3917     3917           
=========================================
  Files           321      321           
  Lines         14788    14788           
  Branches       1951     1951           
=========================================
  Hits          11850    11850           
  Misses         2170     2170           
  Partials        768      768           
Impacted Files Coverage Δ
...sentry/profilemeasurements/ProfileMeasurement.java 52.72% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

# Conflicts:
#	CHANGELOG.md
#	sentry/src/main/java/io/sentry/TransactionPerformanceCollector.java
# Conflicts:
#	CHANGELOG.md
#	sentry-android-core/api/sentry-android-core.api
#	sentry-android-core/src/main/java/io/sentry/android/core/AndroidCpuCollector.java
#	sentry-android-core/src/main/java/io/sentry/android/core/AndroidOptionsInitializer.java
#	sentry-android-core/src/test/java/io/sentry/android/core/AndroidCpuCollectorTest.kt
#	sentry-android-core/src/test/java/io/sentry/android/core/AndroidMemoryCollectorTest.kt
#	sentry/api/sentry.api
#	sentry/src/main/java/io/sentry/PerformanceCollectionData.java
#	sentry/src/main/java/io/sentry/SentryOptions.java
#	sentry/src/main/java/io/sentry/TransactionPerformanceCollector.java
#	sentry/src/test/java/io/sentry/JavaMemoryCollectorTest.kt
#	sentry/src/test/java/io/sentry/TransactionPerformanceCollectorTest.kt
…roid-profiles-cpu-measurement

# Conflicts:
#	sentry-android-core/src/test/java/io/sentry/android/core/AndroidTransactionProfilerTest.kt
@stefanosiano stefanosiano marked this pull request as ready for review January 25, 2023 09:19
Base automatically changed from feat/android-profiles-memory-measurement to main January 25, 2023 09:54
# Conflicts:
#	CHANGELOG.md
#	sentry-android-core/src/main/java/io/sentry/android/core/AndroidTransactionProfiler.java
#	sentry-android-core/src/test/java/io/sentry/android/core/AndroidTransactionProfilerTest.kt
#	sentry/src/main/java/io/sentry/profilemeasurements/ProfileMeasurement.java
#	sentry/src/test/java/io/sentry/JsonSerializerTest.kt
@stefanosiano stefanosiano merged commit fb1c50c into main Jan 25, 2023
@stefanosiano stefanosiano deleted the feat/android-profiles-cpu-measurement branch January 25, 2023 11:32
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.

3 participants