Skip to content

Commit 7f01493

Browse files
committed
method has been changed to http.method in http spans
1 parent 016ad4c commit 7f01493

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

dart/lib/src/protocol/sentry_response.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import '../utils/iterable_extension.dart';
55
/// The response interface contains information on a HTTP request related to the event.
66
@immutable
77
class SentryResponse {
8-
/// The tpye of this class in the [Contexts] field
8+
/// The type of this class in the [Contexts] field
99
static const String type = 'response';
1010

1111
/// The size of the response body.

dio/lib/src/sentry_transformer.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class SentryTransformer implements Transformer {
2727
description: description,
2828
);
2929

30-
span?.setData('method', options.method);
30+
span?.setData('http.method', options.method);
3131
urlDetails?.applyToSpan(span);
3232

3333
String? request;
@@ -62,7 +62,7 @@ class SentryTransformer implements Transformer {
6262
description: description,
6363
);
6464

65-
span?.setData('method', options.method);
65+
span?.setData('http.method', options.method);
6666
urlDetails?.applyToSpan(span);
6767

6868
dynamic transformedResponse;

dio/lib/src/tracing_client_adapter.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class TracingClientAdapter implements HttpClientAdapter {
4343
span = null;
4444
}
4545

46-
span?.setData('method', options.method);
46+
span?.setData('http.method', options.method);
4747
urlDetails?.applyToSpan(span);
4848

4949
ResponseBody? response;

dio/test/sentry_transformer_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void main() {
3939
expect(span.status, SpanStatus.ok());
4040
expect(span.context.operation, 'serialize.http.client');
4141
expect(span.context.description, 'GET https://example.com');
42-
expect(span.data['method'], 'GET');
42+
expect(span.data['http.method'], 'GET');
4343
expect(span.data['url'], 'https://example.com');
4444
expect(span.data['http.query'], 'foo=bar');
4545
expect(span.data['http.fragment'], 'baz');
@@ -65,7 +65,7 @@ void main() {
6565
expect(span.status, SpanStatus.internalError());
6666
expect(span.context.operation, 'serialize.http.client');
6767
expect(span.context.description, 'GET https://example.com');
68-
expect(span.data['method'], 'GET');
68+
expect(span.data['http.method'], 'GET');
6969
expect(span.data['url'], 'https://example.com');
7070
expect(span.data['http.query'], 'foo=bar');
7171
expect(span.data['http.fragment'], 'baz');
@@ -93,7 +93,7 @@ void main() {
9393
expect(span.status, SpanStatus.ok());
9494
expect(span.context.operation, 'serialize.http.client');
9595
expect(span.context.description, 'GET https://example.com');
96-
expect(span.data['method'], 'GET');
96+
expect(span.data['http.method'], 'GET');
9797
expect(span.data['url'], 'https://example.com');
9898
expect(span.data['http.query'], 'foo=bar');
9999
expect(span.data['http.fragment'], 'baz');
@@ -122,7 +122,7 @@ void main() {
122122
expect(span.status, SpanStatus.internalError());
123123
expect(span.context.operation, 'serialize.http.client');
124124
expect(span.context.description, 'GET https://example.com');
125-
expect(span.data['method'], 'GET');
125+
expect(span.data['http.method'], 'GET');
126126
expect(span.data['url'], 'https://example.com');
127127
expect(span.data['http.query'], 'foo=bar');
128128
expect(span.data['http.fragment'], 'baz');

dio/test/tracing_client_adapter_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void main() {
4242
expect(span.status, SpanStatus.ok());
4343
expect(span.context.operation, 'http.client');
4444
expect(span.context.description, 'GET https://example.com');
45-
expect(span.data['method'], 'GET');
45+
expect(span.data['http.method'], 'GET');
4646
expect(span.data['url'], 'https://example.com');
4747
expect(span.data['http.query'], 'foo=bar');
4848
expect(span.data['http.fragment'], 'baz');

0 commit comments

Comments
 (0)