File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,15 @@ export declare class SentryPlugin implements Plugin {
60
60
sentry : Partial < SentryOptions > ;
61
61
serverless : Serverless ;
62
62
options : Serverless . Options ;
63
+ logging : Plugin . Logging ;
63
64
custom : Service . Custom ;
64
65
hooks : {
65
66
[ event : string ] : ( ...rest : any [ ] ) => any ;
66
67
} ;
67
68
provider : Aws ;
68
69
validated : boolean ;
69
70
isInstrumented : boolean ;
70
- constructor ( serverless : Serverless , options : Serverless . Options ) ;
71
+ constructor ( serverless : Serverless , options : Serverless . Options , logging : Plugin . Logging ) ;
71
72
configPlugin ( ) : void ;
72
73
validate ( ) : Promise < void > ;
73
74
instrumentFunction ( originalDefinition : Serverless . FunctionDefinition , setEnv : boolean ) : FunctionDefinitionWithSentry ;
Original file line number Diff line number Diff line change @@ -61,10 +61,11 @@ var _e = encodeURIComponent;
61
61
* Serverless Plugin forward Lambda exceptions to Sentry (https://sentry.io)
62
62
*/
63
63
var SentryPlugin = /** @class */ ( function ( ) {
64
- function SentryPlugin ( serverless , options ) {
64
+ function SentryPlugin ( serverless , options , logging ) {
65
65
var _this = this ;
66
66
this . serverless = serverless ;
67
67
this . options = options ;
68
+ this . logging = logging ;
68
69
this . custom = this . serverless . service . custom ;
69
70
this . provider = this . serverless . getProvider ( "aws" ) ;
70
71
// Create schema for our properties. For reference use https://github.com/ajv-validator/ajv
@@ -179,11 +180,13 @@ var SentryPlugin = /** @class */ (function () {
179
180
case 0 : return [ 4 /*yield*/ , this . createSentryRelease ( ) ] ;
180
181
case 1 :
181
182
_a . sent ( ) ;
182
- return [ 4 /*yield*/ , this . uploadSentrySourcemaps ( ) ] ;
183
- case 2 :
184
- _a . sent ( ) ;
183
+ // uploading sentry source maps doesn't work for "deploy function" command #67
184
+ // TODO to add proper fix once it's addressed on serverless-core https://github.com/serverless/serverless/issues/11179
185
+ this . logging . log . warning ( 'Uploading source maps is skipped for "deploy function" because it is not working' ) ;
186
+ // await this.uploadSentrySourcemaps();
185
187
return [ 4 /*yield*/ , this . deploySentryRelease ( ) ] ;
186
- case 3 :
188
+ case 2 :
189
+ // await this.uploadSentrySourcemaps();
187
190
_a . sent ( ) ;
188
191
return [ 2 /*return*/ ] ;
189
192
}
Original file line number Diff line number Diff line change @@ -80,15 +80,17 @@ export class SentryPlugin implements Plugin {
80
80
sentry : Partial < SentryOptions > ;
81
81
serverless : Serverless ;
82
82
options : Serverless . Options ;
83
+ logging : Plugin . Logging ;
83
84
custom : Service . Custom ;
84
85
hooks : { [ event : string ] : ( ...rest : any [ ] ) => any } ;
85
86
provider : Aws ;
86
87
validated : boolean ;
87
88
isInstrumented : boolean ;
88
89
89
- constructor ( serverless : Serverless , options : Serverless . Options ) {
90
+ constructor ( serverless : Serverless , options : Serverless . Options , logging : Plugin . Logging ) {
90
91
this . serverless = serverless ;
91
92
this . options = options ;
93
+ this . logging = logging ;
92
94
this . custom = this . serverless . service . custom ;
93
95
this . provider = this . serverless . getProvider ( "aws" ) ;
94
96
@@ -162,7 +164,10 @@ export class SentryPlugin implements Plugin {
162
164
163
165
"after:deploy:function:deploy" : async ( ) => {
164
166
await this . createSentryRelease ( ) ;
165
- await this . uploadSentrySourcemaps ( ) ;
167
+ // uploading sentry source maps doesn't work for "deploy function" command #67
168
+ // TODO to add proper fix once it's addressed on serverless-core https://github.com/serverless/serverless/issues/11179
169
+ this . logging . log . warning ( 'Uploading source maps is skipped for "deploy function" because it is not working' ) ;
170
+ // await this.uploadSentrySourcemaps();
166
171
await this . deploySentryRelease ( ) ;
167
172
} ,
168
173
You can’t perform that action at this time.
0 commit comments