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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add other metric types and weight (part 2) #1949

Merged
merged 7 commits into from Apr 4, 2024

Conversation

stefanosiano
Copy link
Member

馃摐 Description

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

#skip-changelog

馃挕 Motivation and Context

Continues #1940
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

added Gauge, Distribution and Set metrics
added weight to Metrics and auto flush when weight is too much
Copy link
Contributor

github-actions bot commented Mar 25, 2024

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

Generated by 馃毇 dangerJS against d93ace2

@stefanosiano stefanosiano changed the base branch from main to feat/metrics_counter_p1 March 25, 2024 10:58
@stefanosiano stefanosiano marked this pull request as ready for review March 25, 2024 11:17
# Conflicts:
#	dart/lib/src/metrics/metric.dart
#	dart/lib/src/metrics/metrics_aggregator.dart
@stefanosiano stefanosiano changed the title Feat/metrics types weight p2 Add other metric types and weight (part 2) Mar 27, 2024
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.

Just some minor things.

Apart from those, some tests are failing locally if i run flutter test in the flutter folder. I don't see how this PR would affect those, so maybe it's just an issue on my machine.

Bildschirmfoto 2024-04-02 um 14 48 26

dart/lib/src/metrics/metric.dart Show resolved Hide resolved
dart/lib/src/metrics/metric.dart Outdated Show resolved Hide resolved
dart/lib/src/metrics/metric.dart Outdated Show resolved Hide resolved
dart/lib/src/metrics/metrics_aggregator.dart Outdated Show resolved Hide resolved
dart/lib/src/metrics/metrics_api.dart Outdated Show resolved Hide resolved
dart/lib/src/metrics/metrics_api.dart Show resolved Hide resolved
@stefanosiano
Copy link
Member Author

Apart from those, some tests are failing locally if i run flutter test in the flutter folder. I don't see how this PR would affect those, so maybe it's just an issue on my machine.

I tried running flutter test and it works just fine 馃槃 (and it works in CI, too)
I guess it's an issue on your machine. Maybe just a matter of pub get/upgrade?

* 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 stefanosiano merged commit 64400d3 into feat/metrics_counter_p1 Apr 4, 2024
123 checks passed
@stefanosiano stefanosiano deleted the feat/metrics_types_weight_p2 branch April 4, 2024 17:29
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