Skip to content

Commit 047695b

Browse files
committed
Merge branch 'main' into clean-up-integrations
2 parents f491059 + a62d9aa commit 047695b

File tree

88 files changed

+2909
-887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2909
-887
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @marandaneto @brustolin
1+
* @marandaneto @brustolin @krystofwoldrich

.github/workflows/danger.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
name: "Danger"
1+
name: Danger
2+
23
on:
34
pull_request:
45
types: [opened, synchronize, reopened, edited, ready_for_review]
56

67
jobs:
7-
build:
8-
name: Changelog
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v3
12-
with:
13-
fetch-depth: 0
14-
- run: npx danger ci
15-
env:
16-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
danger:
9+
uses: getsentry/github-workflows/.github/workflows/danger.yml@v2

CHANGELOG.md

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,46 @@
11
# Changelog
22

3-
## Unreleased
3+
## 6.11.1
4+
5+
### Fixes
6+
7+
- Align span spec for serialize ops ([#1024](https://github.com/getsentry/sentry-dart/pull/1024))
8+
- Pin sentry version ([#1020](https://github.com/getsentry/sentry-dart/pull/1020))
9+
10+
### Features
11+
12+
- Bump Cocoa SDK from v7.25.1 to v7.26.0 ([#1023](https://github.com/getsentry/sentry-dart/pull/1023))
13+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7260)
14+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.25.1...7.26.0)
15+
16+
## 6.11.0
17+
18+
### Fixes
19+
20+
- Scope cloning method was not setting the user ([#1013](https://github.com/getsentry/sentry-dart/pull/1013))
21+
22+
### Features
23+
24+
- Dynamic sampling ([#1004](https://github.com/getsentry/sentry-dart/pull/1004))
25+
- Set custom measurements on transactions ([#1011](https://github.com/getsentry/sentry-dart/pull/1011))
26+
27+
## 6.10.0
428

529
### Fixes
630

731
- Capture Callback Exceptions ([#990](https://github.com/getsentry/sentry-dart/pull/990))
32+
- Allow routeNameExtractor to set transaction names ([#1005](https://github.com/getsentry/sentry-dart/pull/1005))
833

934
### Features
1035

1136
- Prepare future support for iOS and macOS obfuscated app symbolication using dSYM (requires Flutter `master` channel) ([#823](https://github.com/getsentry/sentry-dart/pull/823))
12-
- Bump Android SDK from v6.3.1 to v6.4.1 ([#989](https://github.com/getsentry/sentry-dart/pull/989))
13-
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#641)
14-
- [diff](https://github.com/getsentry/sentry-java/compare/6.3.1...6.4.1)
15-
- Bump Cocoa SDK from v7.23.0 to v7.25.0 ([#993](https://github.com/getsentry/sentry-dart/pull/993), [#996](https://github.com/getsentry/sentry-dart/pull/996), [#1000](https://github.com/getsentry/sentry-dart/pull/1000))
16-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7250)
17-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.23.0...7.25.0)
37+
- Bump Android SDK from v6.3.1 to v6.4.2 ([#989](https://github.com/getsentry/sentry-dart/pull/989), [#1009](https://github.com/getsentry/sentry-dart/pull/1009))
38+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#642)
39+
- [diff](https://github.com/getsentry/sentry-java/compare/6.3.1...6.4.2)
40+
- Bump Cocoa SDK from v7.23.0 to v7.25.1 ([#993](https://github.com/getsentry/sentry-dart/pull/993), [#996](https://github.com/getsentry/sentry-dart/pull/996), [#1000](https://github.com/getsentry/sentry-dart/pull/1000), [#1007](https://github.com/getsentry/sentry-dart/pull/1007))
41+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/master/CHANGELOG.md#7251)
42+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/7.23.0...7.25.1)
43+
- Dynamic sampling ([#1004](https://github.com/getsentry/sentry-dart/pull/1004))
1844

1945
## 6.9.1
2046

dangerfile.js

Lines changed: 0 additions & 70 deletions
This file was deleted.

dart/example/bin/example.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import 'event_example.dart';
1212
Future<void> main() async {
1313
// ATTENTION: Change the DSN below with your own to see the events in Sentry. Get one at sentry.io
1414
const dsn =
15-
'https://9934c532bf8446ef961450973c898537@o447951.ingest.sentry.io/5428562';
15+
'https://e85b375ffb9f43cf8bdf9787768149e0@o447951.ingest.sentry.io/5428562';
1616

1717
await Sentry.init(
1818
(options) => options

dart/example_web/web/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'event.dart';
88

99
// ATTENTION: Change the DSN below with your own to see the events in Sentry. Get one at sentry.io
1010
const dsn =
11-
'https://9934c532bf8446ef961450973c898537@o447951.ingest.sentry.io/5428562';
11+
'https://e85b375ffb9f43cf8bdf9787768149e0@o447951.ingest.sentry.io/5428562';
1212

1313
Future<void> main() async {
1414
await Sentry.init(

dart/lib/sentry.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ export 'src/http_client/sentry_http_client.dart';
2727
export 'src/http_client/sentry_http_client_error.dart';
2828
export 'src/sentry_attachment/sentry_attachment.dart';
2929
export 'src/sentry_user_feedback.dart';
30+
export 'src/utils/tracing_utils.dart';
3031
// tracing
3132
export 'src/tracing.dart';
32-
export 'src/sentry_measurement.dart';

dart/lib/src/http_client/tracing_client.dart

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:http/http.dart';
22
import '../hub.dart';
33
import '../hub_adapter.dart';
44
import '../protocol.dart';
5+
import '../utils/tracing_utils.dart';
56

67
/// A [http](https://pub.dev/packages/http)-package compatible HTTP client
78
/// which adds support to Sentry Performance feature.
@@ -26,12 +27,17 @@ class TracingClient extends BaseClient {
2627
StreamedResponse? response;
2728
try {
2829
if (span != null) {
29-
final traceHeader = span.toSentryTrace();
30-
request.headers[traceHeader.name] = traceHeader.value;
30+
if (containsTracePropagationTarget(
31+
_hub.options.tracePropagationTargets, request.url.toString())) {
32+
addSentryTraceHeader(span, request.headers);
33+
addBaggageHeader(
34+
span,
35+
request.headers,
36+
logger: _hub.options.logger,
37+
);
38+
}
3139
}
3240

33-
// TODO: tracingOrigins support
34-
3541
response = await _client.send(request);
3642
span?.status = SpanStatus.fromHttpStatusCode(response.statusCode);
3743
} catch (exception) {

dart/lib/src/hub.dart

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,10 @@ class Hub {
403403
transactionContext, customSamplingContext ?? {});
404404

405405
// if transactionContext has no sampled decision, run the traces sampler
406-
if (transactionContext.sampled == null) {
407-
final sampled = _tracesSampler.sample(samplingContext);
408-
transactionContext = transactionContext.copyWith(sampled: sampled);
406+
if (transactionContext.samplingDecision == null) {
407+
final samplingDecision = _tracesSampler.sample(samplingContext);
408+
transactionContext =
409+
transactionContext.copyWith(samplingDecision: samplingDecision);
409410
}
410411

411412
final tracer = SentryTracer(
@@ -450,7 +451,10 @@ class Hub {
450451
}
451452

452453
@internal
453-
Future<SentryId> captureTransaction(SentryTransaction transaction) async {
454+
Future<SentryId> captureTransaction(
455+
SentryTransaction transaction, {
456+
SentryTraceContextHeader? traceContext,
457+
}) async {
454458
var sentryId = SentryId.empty();
455459

456460
if (!_isEnabled) {
@@ -485,6 +489,7 @@ class Hub {
485489
sentryId = await item.client.captureTransaction(
486490
transaction,
487491
scope: item.scope,
492+
traceContext: traceContext,
488493
);
489494
} catch (exception, stackTrace) {
490495
_options.logger(
@@ -516,7 +521,7 @@ class Hub {
516521
final span = pair.key;
517522
final spanContext = span.context;
518523
event.contexts.trace = spanContext.toTraceContext(
519-
sampled: span.sampled,
524+
sampled: span.samplingDecision?.sampled,
520525
);
521526

522527
// set transaction name to event.transaction

dart/lib/src/hub_adapter.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,14 @@ class HubAdapter implements Hub {
9494
SentryId get lastEventId => Sentry.lastEventId;
9595

9696
@override
97-
Future<SentryId> captureTransaction(SentryTransaction transaction) =>
98-
Sentry.currentHub.captureTransaction(transaction);
97+
Future<SentryId> captureTransaction(
98+
SentryTransaction transaction, {
99+
SentryTraceContextHeader? traceContext,
100+
}) =>
101+
Sentry.currentHub.captureTransaction(
102+
transaction,
103+
traceContext: traceContext,
104+
);
99105

100106
@override
101107
ISentrySpan? getSpan() => Sentry.currentHub.getSpan();

0 commit comments

Comments
 (0)