Skip to content

Commit 8da73ac

Browse files
committed
fix(aws-lambda): Avoid overwriting root span name
1 parent 95cc948 commit 8da73ac

File tree

1 file changed

+1
-4
lines changed
  • packages/aws-serverless/src

1 file changed

+1
-4
lines changed

packages/aws-serverless/src/sdk.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,7 @@ function enhanceScopeWithEnvironmentData(scope: Scope, context: Context, startTi
220220
* @param context AWS Lambda context that will be used to extract some part of the data
221221
*/
222222
function enhanceScopeWithTransactionData(scope: Scope, context: Context): void {
223-
scope.addEventProcessor(event => {
224-
event.transaction = context.functionName;
225-
return event;
226-
});
223+
scope.setTransactionName(context.functionName);
227224
scope.setTag('server_name', process.env._AWS_XRAY_DAEMON_ADDRESS || process.env.SENTRY_NAME || hostname());
228225
scope.setTag('url', `awslambda:///${context.functionName}`);
229226
}

0 commit comments

Comments
 (0)