Skip to content

Commit cf50cc4

Browse files
chore: bump version to v0.10.0 (#143)
## Summary - Bump version from 0.9.0 to 0.10.0 - Update version in pubspec.yaml, android/build.gradle, ios/faro.podspec, lib/src/util/constants.dart - Update CHANGELOG.md with release date ## What's in this release ### Added - **Session sampling support**: New `sampling` configuration option allows controlling what percentage of sessions send telemetry data. This enables cost management and traffic reduction for high-volume applications. (Resolves #89) - Use `SamplingRate(0.5)` for fixed 50% sampling - Use `SamplingFunction((context) => ...)` for dynamic sampling based on session context - Sampling decision is made once per session and applies to all telemetry types - **ContextScope for span context lifetime control**: New `contextScope` parameter on `startSpan()` controls how long a span remains active in zone context. (Resolves #105) - **Span.noParent sentinel**: New `Span.noParent` static constant allows explicitly starting a span with no parent. (Resolves #105) ### Fixed - **SDK-internal span attributes now use typed values**: HTTP span attributes are now sent as integers instead of strings, enabling proper numeric queries in Tempo - **Session attributes support typed values**: `sessionAttributes` config now accepts `Map<String, Object>` allowing typed custom attributes (Resolves #133) ### Checklist - [x] Pre-release checks passed - [x] Version bumped in all files - [x] CHANGELOG updated with release date - [x] Post-release checks passed (dry-run publish) Made with [Cursor](https://cursor.com) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Mostly release/versioning changes, but it adds an automated script that creates tags and GitHub releases (and can call an external OpenAI API), so incorrect usage/config could affect release integrity. > > **Overview** > Bumps the package version to `0.10.0` across Dart (`pubspec.yaml`, `FaroConstants`), Android (`build.gradle`), iOS (`faro.podspec`), and the example lockfile, and adds a dated `0.10.0` entry to `CHANGELOG.md`. > > Updates the release process docs to use a new `dart tool/create_release.dart` script, which extracts the current version’s changelog section, previews release notes, creates/pushes a git tag, and creates a GitHub release via `gh` (optionally AI-enriching notes via `OPENAI_API_KEY`), with new unit tests covering changelog extraction edge cases. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 117d3f0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2e6aa40 commit cf50cc4

File tree

9 files changed

+616
-10
lines changed

9 files changed

+616
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.10.0] - 2026-02-09
11+
1012
### Added
1113

1214
- **Session sampling support**: New `sampling` configuration option allows controlling what percentage of sessions send telemetry data. This enables cost management and traffic reduction for high-volume applications. (Resolves #89)

RELEASING.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,22 +85,32 @@ As you develop new features or fix bugs, add entries to the `CHANGELOG.md` under
8585
- Title: `chore: bump version to v0.3.4`
8686
- Description: Review changelog and version updates
8787

88-
7. **Merge and Tag**
88+
7. **Create Release**
8989

90-
After PR review and merge:
90+
After PR review and merge, use the release script:
9191

9292
```bash
9393
git checkout main
9494
git pull origin main
95-
git tag v0.3.4
96-
git push origin v0.3.4
95+
dart tool/create_release.dart
9796
```
9897

98+
> **Tip:** Use `dart tool/create_release.dart --dry-run` to preview without creating anything.
99+
100+
> **Tip:** Use `dart tool/create_release.dart --enrich` to use AI to generate polished release notes from the changelog (requires `OPENAI_API_KEY` environment variable).
101+
102+
This will:
103+
104+
- Read the version from `pubspec.yaml`
105+
- Extract release notes from `CHANGELOG.md`
106+
- Show a preview and ask for confirmation
107+
- Create and push the git tag
108+
- Create a GitHub release with changelog content and compare link
109+
99110
8. **Automated Publishing**
100111

101112
- GitHub Actions automatically publishes to pub.dev when you push a version tag
102113
- Uses the `pub.dev` GitHub environment for security
103-
- Creates a GitHub release automatically
104114
- No manual `flutter pub publish` needed!
105115

106116
9. **Post-Release**

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.grafana.faro'
2-
version '0.9.0'
2+
version '0.10.0'
33

44
buildscript {
55
repositories {

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ packages:
167167
path: ".."
168168
relative: true
169169
source: path
170-
version: "0.9.0"
170+
version: "0.10.0"
171171
ffi:
172172
dependency: transitive
173173
description:

ios/faro.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'faro'
7-
s.version = '0.9.0'
7+
s.version = '0.10.0'
88
s.summary = 'A new Flutter plugin project.'
99
s.description = <<-DESC
1010
A new Flutter plugin project.

lib/src/util/constants.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// Constants for the Faro Flutter SDK
22
class FaroConstants {
33
/// The version of the Faro Flutter SDK
4-
static const String sdkVersion = '0.9.0';
4+
static const String sdkVersion = '0.10.0';
55

66
/// The name of the Faro Flutter SDK
77
static const String sdkName = 'faro-flutter-sdk';

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: faro
22
description: Grafana Faro SDK for Flutter applications - Monitor your Flutter app with ease.
3-
version: 0.9.0
3+
version: 0.10.0
44
homepage: https://grafana.com/oss/faro/
55
repository: https://github.com/grafana/faro-flutter-sdk
66

test/tool/create_release_test.dart

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import 'package:flutter_test/flutter_test.dart';
2+
3+
import '../../tool/create_release.dart';
4+
5+
typedef Lines = List<String>;
6+
7+
void main() {
8+
group('extractChangelogForVersion:', () {
9+
test('extracts content for a specific version', () {
10+
final content = _joinLines([
11+
'# Changelog',
12+
'',
13+
'## [Unreleased]',
14+
'',
15+
'## [0.10.0] - 2026-02-09',
16+
'',
17+
'### Added',
18+
'- New feature A',
19+
'- New feature B',
20+
'',
21+
'## [0.9.0] - 2026-01-28',
22+
'',
23+
'### Fixed',
24+
'- Bug fix C',
25+
]);
26+
27+
final extracted = extractChangelogForVersion(content, '0.10.0');
28+
29+
expect(extracted, contains('### Added'));
30+
expect(extracted, contains('- New feature A'));
31+
expect(extracted, contains('- New feature B'));
32+
expect(extracted, isNot(contains('### Fixed')));
33+
expect(extracted, isNot(contains('- Bug fix C')));
34+
});
35+
36+
test('stops at next header even if version is prefix', () {
37+
final content = _joinLines([
38+
'# Changelog',
39+
'',
40+
'## [Unreleased]',
41+
'',
42+
'## [0.1.1] - 2026-02-01',
43+
'- Fix alpha issue',
44+
'',
45+
'## [0.1.10] - 2026-02-03',
46+
'- Add beta feature',
47+
'',
48+
'## [0.1.2] - 2026-02-04',
49+
'- Another fix',
50+
]);
51+
52+
final extracted = extractChangelogForVersion(content, '0.1.1');
53+
54+
expect(extracted, contains('- Fix alpha issue'));
55+
expect(extracted, isNot(contains('- Add beta feature')));
56+
expect(extracted, isNot(contains('- Another fix')));
57+
});
58+
59+
test('throws when version is not found', () {
60+
final content = _joinLines([
61+
'# Changelog',
62+
'',
63+
'## [Unreleased]',
64+
'',
65+
'## [0.1.0] - 2026-01-01',
66+
'- Initial release',
67+
]);
68+
69+
expect(
70+
() => extractChangelogForVersion(content, '0.2.0'),
71+
throwsA(isA<Exception>()),
72+
);
73+
});
74+
75+
test('removes leading and trailing empty lines', () {
76+
final content = _joinLines([
77+
'## [0.5.0] - 2026-01-01',
78+
'',
79+
'',
80+
'### Added',
81+
'- Feature X',
82+
'',
83+
'',
84+
'## [0.4.0] - 2025-12-01',
85+
'- Old stuff',
86+
]);
87+
88+
final extracted = extractChangelogForVersion(content, '0.5.0');
89+
90+
expect(extracted, startsWith('### Added'));
91+
expect(extracted, endsWith('- Feature X'));
92+
});
93+
});
94+
}
95+
96+
String _joinLines(Lines lines) => lines.join('\n');

0 commit comments

Comments
 (0)