File tree 10 files changed +55
-25
lines changed
10 files changed +55
-25
lines changed Original file line number Diff line number Diff line change 12
12
" packages/*"
13
13
],
14
14
"devDependencies" : {
15
- "@appsignal/types" : " ^2.1.2 " ,
15
+ "@appsignal/types" : " ^2.1.3 " ,
16
16
"@types/jest" : " ^26.0.19" ,
17
17
"husky" : " ^4.3.6" ,
18
18
"jest" : " ^26.6.3" ,
Original file line number Diff line number Diff line change 5
5
"types" : " dist/index" ,
6
6
"license" : " MIT" ,
7
7
"dependencies" : {
8
- "@appsignal/types" : " ^2.1.2 " ,
8
+ "@appsignal/types" : " ^2.1.3 " ,
9
9
"apollo-server-plugin-base" : " ^0.10.3" ,
10
10
"tslib" : " ^2.0.3"
11
11
},
Original file line number Diff line number Diff line change 5
5
"types" : " dist/index" ,
6
6
"license" : " MIT" ,
7
7
"dependencies" : {
8
- "@appsignal/types" : " ^2.1.2 " ,
8
+ "@appsignal/types" : " ^2.1.3 " ,
9
9
"tslib" : " ^2.0.3"
10
10
},
11
11
"peerDependencies" : {
Original file line number Diff line number Diff line change 5
5
"types" : " dist/index" ,
6
6
"license" : " MIT" ,
7
7
"dependencies" : {
8
- "@appsignal/types" : " ^2.1.2 " ,
8
+ "@appsignal/types" : " ^2.1.3 " ,
9
9
"shimmer" : " ^1.2.1" ,
10
10
"tslib" : " ^2.0.3"
11
11
},
Original file line number Diff line number Diff line change 5
5
"types" : " dist/index" ,
6
6
"license" : " MIT" ,
7
7
"dependencies" : {
8
- "@appsignal/types" : " ^2.1.2 " ,
8
+ "@appsignal/types" : " ^2.1.3 " ,
9
9
"tslib" : " ^2.0.3"
10
10
},
11
11
"peerDependencies" : {
Original file line number Diff line number Diff line change
1
+ ---
2
+ bump : " patch"
3
+ ---
4
+
5
+ Deprecate the addError function on the Span interface. Instead use the Tracer's ` setError ` function to set the error on the root span.
Original file line number Diff line number Diff line change 9
9
},
10
10
"dependencies" : {
11
11
"@appsignal/core" : " ^1.1.4" ,
12
- "@appsignal/types" : " ^2.1.2 " ,
12
+ "@appsignal/types" : " ^2.1.3 " ,
13
13
"require-in-the-middle" : " ^5.1.0" ,
14
14
"semver" : " ^7.3.4" ,
15
15
"shimmer" : " ^1.2.1" ,
Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ export class NoopSpan implements NodeSpan {
17
17
return new NoopSpan ( )
18
18
}
19
19
20
+ public addError ( error : Error ) : this {
21
+ console . warn (
22
+ "DEPRECATED: Please use the `tracer.setError` helper instead to set the error on the root span."
23
+ )
24
+ return this
25
+ }
26
+
20
27
public setError ( error : Error ) : this {
21
28
return this
22
29
}
Original file line number Diff line number Diff line change @@ -143,12 +143,30 @@ export class BaseSpan implements NodeSpan {
143
143
return this
144
144
}
145
145
146
+ /**
147
+ * Add a given `Error` object to the current `Span`.
148
+ * Use `tracer.setError()` instead.
149
+ *
150
+ * @deprecated since Node.js version 2.1.0
151
+ */
152
+ public addError ( error : Error ) : this {
153
+ console . warn (
154
+ "DEPRECATED: Please use the `tracer.setError` helper instead to set the error on the root span."
155
+ )
156
+
157
+ return this
158
+ }
159
+
146
160
/**
147
161
* Set a given `Error` object to the current `Span`.
148
- * Use tracer.setError() instead.
162
+ * Use `tracer.setError()` instead.
163
+ *
164
+ * @deprecated since Node.js version 2.1.0
149
165
*/
150
166
public setError ( error : Error ) : this {
151
- console . warn ( "setError() can only be called from a RootSpan object" )
167
+ console . warn (
168
+ "DEPRECATED: Please use the `tracer.setError` helper instead to set the error on the root span."
169
+ )
152
170
153
171
return this
154
172
}
You can’t perform that action at this time.
0 commit comments