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

Fix timing metric value different from span duration #3368

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

stefanosiano
Copy link
Member

📜 Description

removed timing from IMetricsAggregator
duration of timing metric of MetricsApi now equals span duration
local metrics aggregator is fetch directly from the span in the timing api

💡 Motivation and Context

Fixes #3289 and #3290

💚 How did you test it?

Unit tests

📝 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

duration of timing metric of MetricsApi now equals span duration
local metrics aggregator is fetch directly from the span in the timing api
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 402.45 ms 470.40 ms 67.95 ms
Size 1.70 MiB 2.28 MiB 592.12 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0810952 364.51 ms 468.08 ms 103.57 ms
baaf637 462.32 ms 579.22 ms 116.90 ms
1e05e43 411.00 ms 467.29 ms 56.29 ms
86f0096 371.86 ms 439.78 ms 67.92 ms
baaf637 401.69 ms 428.12 ms 26.43 ms
937879e 400.98 ms 482.84 ms 81.86 ms
1ae2ec6 353.85 ms 419.71 ms 65.85 ms
606074f 385.10 ms 428.24 ms 43.14 ms
9119d59 407.12 ms 509.64 ms 102.52 ms
93a76ca 391.54 ms 475.65 ms 84.11 ms

App size

Revision Plain With Sentry Diff
0810952 1.72 MiB 2.27 MiB 558.21 KiB
baaf637 1.72 MiB 2.27 MiB 558.42 KiB
1e05e43 1.70 MiB 2.28 MiB 590.89 KiB
86f0096 1.72 MiB 2.29 MiB 576.50 KiB
baaf637 1.72 MiB 2.27 MiB 558.42 KiB
937879e 1.72 MiB 2.27 MiB 558.42 KiB
1ae2ec6 1.70 MiB 2.27 MiB 584.63 KiB
606074f 1.70 MiB 2.27 MiB 582.26 KiB
9119d59 1.70 MiB 2.27 MiB 583.84 KiB
93a76ca 1.72 MiB 2.29 MiB 576.75 KiB

@stefanosiano stefanosiano marked this pull request as ready for review April 17, 2024 11:16
Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

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

Nice!

@stefanosiano stefanosiano merged commit 61981dc into main Apr 17, 2024
25 checks passed
@stefanosiano stefanosiano deleted the fix/metrics-timing-span-duration branch April 17, 2024 12:46
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.

[Metrics] Align Metric and Span duration for timing API
2 participants