Skip to content

Commit

Permalink
Deprecate: metrics api (#2312)
Browse files Browse the repository at this point in the history
* deprecate metrics api

* update changelog'

* fix analyze

* fix flutter analyze

* remove metrics tests

* update

* remove metrics test

* Update CHANGELOG.md

* deprecate Hub.metricsApi as well

* fix analyze
  • Loading branch information
buenaflor authored Oct 1, 2024
1 parent 84c28cd commit 8c0b6dc
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 1,006 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Features

- Emit `transaction.data` inside `contexts.trace.data` ([#2284](https://github.com/getsentry/sentry-dart/pull/2284))
- Blocking app starts if "appLaunchedInForeground" is false. (Android only) ([#2291](https://github.com/getsentry/sentry-dart/pull/2291)
- Blocking app starts if "appLaunchedInForeground" is false. (Android only) ([#2291](https://github.com/getsentry/sentry-dart/pull/2291))

### Enhancements

Expand All @@ -21,6 +21,11 @@
- Rounding error used on frames.total and reject frame measurements if frames.total is less than frames.slow or frames.frozen ([#2308](https://github.com/getsentry/sentry-dart/pull/2308))
- iOS replay integration when only `onErrorSampleRate` is specified ([#2306](https://github.com/getsentry/sentry-dart/pull/2306))

### Deprecate

- Metrics API ([#2312](https://github.com/getsentry/sentry-dart/pull/2312))
- Learn more: https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Metrics-Beta-Coming-to-an-End

## 8.9.0

### Features
Expand Down
2 changes: 2 additions & 0 deletions dart/lib/src/hub.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class Hub {
late final MetricsApi _metricsApi;

@internal
@Deprecated(
'Metrics will be deprecated and removed in the next major release. Sentry will reject all metrics sent after October 7, 2024. Learn more: https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Upcoming-API-Changes-to-Metrics')
MetricsApi get metricsApi => _metricsApi;

@internal
Expand Down
1 change: 1 addition & 0 deletions dart/lib/src/hub_adapter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class HubAdapter implements Hub {

@override
@internal
// ignore: deprecated_member_use_from_same_package
MetricsApi get metricsApi => Sentry.currentHub.metricsApi;

factory HubAdapter() {
Expand Down
2 changes: 2 additions & 0 deletions dart/lib/src/sentry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ class Sentry {
static ISentrySpan? getSpan() => _hub.getSpan();

/// Gets access to the metrics API for the current hub.
@Deprecated(
'Metrics will be deprecated and removed in the next major release. Sentry will reject all metrics sent after October 7, 2024. Learn more: https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Upcoming-API-Changes-to-Metrics')
static MetricsApi metrics() => _hub.metricsApi;

@internal
Expand Down
40 changes: 0 additions & 40 deletions dart/test/metrics/local_metrics_aggregator_test.dart

This file was deleted.

Loading

0 comments on commit 8c0b6dc

Please sign in to comment.