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

Feat/metrics span summary p4 #1958

Conversation

stefanosiano
Copy link
Member

📜 Description

added local_metrics_aggregator.dart to spans
metrics_aggregator.dart now adds to current span's localMetricsAggregator
added metric_summary.dart
added metricSummary to spans and transaction JSONs

#skip-changelog

💡 Motivation and Context

Continues #1949
Implements another part of #1876

💚 How did you test it?

Unit tests

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

metrics_aggregator.dart now adds to current span's localMetricsAggregator
added metric_summary.dart
added metricSummary to spans and transaction JSONs
Copy link
Contributor

github-actions bot commented Mar 28, 2024

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

Generated by 🚫 dangerJS against bdffa17

Copy link
Contributor

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 374.02 ms 448.96 ms 74.94 ms
Size 6.34 MiB 7.29 MiB 968.47 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
68677de 364.41 ms 415.61 ms 51.20 ms
be08ed1 361.37 ms 414.84 ms 53.47 ms
5e8d2b3 342.17 ms 375.83 ms 33.66 ms
48e79fd 354.22 ms 391.46 ms 37.24 ms
c1bb00f 303.77 ms 371.88 ms 68.11 ms
30c1193 349.00 ms 438.20 ms 89.20 ms
25161f4 353.98 ms 431.94 ms 77.96 ms
0a82a1e 321.02 ms 393.82 ms 72.80 ms
eecbbca 324.37 ms 352.49 ms 28.12 ms
90db9ff 334.86 ms 388.14 ms 53.28 ms

App size

Revision Plain With Sentry Diff
68677de 6.06 MiB 7.10 MiB 1.04 MiB
be08ed1 6.33 MiB 7.26 MiB 946.42 KiB
5e8d2b3 6.15 MiB 7.13 MiB 1000.11 KiB
48e79fd 5.94 MiB 6.95 MiB 1.01 MiB
c1bb00f 6.06 MiB 7.09 MiB 1.03 MiB
30c1193 6.27 MiB 7.20 MiB 958.74 KiB
25161f4 6.27 MiB 7.20 MiB 960.44 KiB
0a82a1e 6.15 MiB 7.11 MiB 981.82 KiB
eecbbca 5.94 MiB 6.89 MiB 975.78 KiB
90db9ff 6.06 MiB 7.10 MiB 1.04 MiB

Copy link
Contributor

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1246.21 ms 1270.21 ms 24.00 ms
Size 8.33 MiB 9.40 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
559d28f 1265.04 ms 1288.96 ms 23.92 ms
62de927 1242.46 ms 1246.11 ms 3.65 ms
4efee31 1270.33 ms 1285.75 ms 15.42 ms
8e133ad 1268.19 ms 1277.37 ms 9.18 ms
a094100 1260.27 ms 1276.75 ms 16.48 ms
7f2b01d 1253.92 ms 1266.70 ms 12.78 ms
eb1a7c1 1281.25 ms 1295.40 ms 14.15 ms
e964e2b 1203.50 ms 1223.16 ms 19.66 ms
202b83f 1206.16 ms 1225.33 ms 19.16 ms
1e781fc 1257.96 ms 1281.49 ms 23.53 ms

App size

Revision Plain With Sentry Diff
559d28f 8.15 MiB 9.12 MiB 987.32 KiB
62de927 8.29 MiB 9.37 MiB 1.08 MiB
4efee31 8.15 MiB 9.12 MiB 991.35 KiB
8e133ad 8.10 MiB 9.16 MiB 1.07 MiB
a094100 8.16 MiB 9.17 MiB 1.01 MiB
7f2b01d 8.16 MiB 9.16 MiB 1.00 MiB
eb1a7c1 8.15 MiB 9.13 MiB 1000.10 KiB
e964e2b 8.32 MiB 9.38 MiB 1.06 MiB
202b83f 8.33 MiB 9.40 MiB 1.07 MiB
1e781fc 8.10 MiB 9.18 MiB 1.08 MiB

@stefanosiano stefanosiano changed the base branch from main to feat/metrics_timing_before_callback_p3 March 28, 2024 18:24
@stefanosiano stefanosiano marked this pull request as ready for review March 28, 2024 18:24
Copy link
Collaborator

@denrase denrase left a comment

Choose a reason for hiding this comment

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

LGTM, just one small typo 👍

dart/lib/src/metrics/metric.dart Show resolved Hide resolved
dart/lib/src/sentry_options.dart Outdated Show resolved Hide resolved
@stefanosiano stefanosiano merged commit 3c41335 into feat/metrics_timing_before_callback_p3 Apr 4, 2024
123 checks passed
@stefanosiano stefanosiano deleted the feat/metrics_span_summary_p4 branch April 4, 2024 16:30
stefanosiano added a commit that referenced this pull request Apr 4, 2024
* added SentryOptions.beforeMetricCallback
* added beforeMetricCallback logic in metrics_aggregator.dart
* added timing metric api with span auto start
* timing api uses span duration as value for the emitted metric if possible

* Feat/metrics span summary p4 (#1958)
* added local_metrics_aggregator.dart to spans
* metrics_aggregator.dart now adds to current span's localMetricsAggregator
* added metric_summary.dart
* added metricSummary to spans and transaction JSONs
stefanosiano added a commit that referenced this pull request Apr 4, 2024
* added crc32_utils.dart, taken from archive library
* added Gauge, Distribution and Set metrics
* added weight to Metrics and auto flush when weight is too much

* Add timing metric and beforeMetric callback (part 3) (#1954)
* added SentryOptions.beforeMetricCallback
* added beforeMetricCallback logic in metrics_aggregator.dart
* added timing metric api with span auto start
* timing api uses span duration as value for the emitted metric if possible

* Feat/metrics span summary p4 (#1958)
* added local_metrics_aggregator.dart to spans
* metrics_aggregator.dart now adds to current span's localMetricsAggregator
* added metric_summary.dart
* added metricSummary to spans and transaction JSONs
stefanosiano added a commit that referenced this pull request Apr 9, 2024
Add Counter Metric API (part 1) (#1940)
* added Counter Metric API
* added Metric Aggregation, with hub/client integration and close
* added metric tag normalization
* added send of statsd envelope type

Add other metric types and weight (part 2) (#1949)
* added crc32_utils.dart, taken from archive library
* added Gauge, Distribution and Set metrics
* added weight to Metrics and auto flush when weight is too much

Add timing metric and beforeMetric callback (part 3) (#1954)
* added SentryOptions.beforeMetricCallback
* added beforeMetricCallback logic in metrics_aggregator.dart
* added timing metric api with span auto start
* timing api uses span duration as value for the emitted metric if possible

Add metrics span summary (part 4) (#1958)
* added local_metrics_aggregator.dart to spans
* metrics_aggregator.dart now adds to current span's localMetricsAggregator
* added metric_summary.dart
* added metricSummary to spans and transaction JSONs

Add rate limit (part 5) (#1973)
* added metric_bucket data category for rate limits
* updated metric normalization rules
* added rate limit for metrics
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.

None yet

2 participants