-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Copy link
Labels
Package: aws-serverlessIssues related to the Sentry AWS Serverless SDKIssues related to the Sentry AWS Serverless SDK
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/aws-serverless
SDK Version
8.26.0
Framework Version
No response
Link to Sentry event
Reproduction Example/SDK Setup
Sentry.init({
dsn: '<DSN>',
tracesSampleRate: 1.0,
environment: 'dev',
})
export const lambdaHandler = Sentry.wrapHandler(() => {
return Sentry.startSpan({op: `foo-op`, name: 'foo-name', forceTransaction: true}, () => {
// ...
})
})
Steps to Reproduce
Just execute the code
Additional information:
The renaming happens here:
sentry-javascript/packages/aws-serverless/src/sdk.ts
Lines 219 to 226 in 5c08d03
function enhanceScopeWithTransactionData(scope: Scope, context: Context): void { | |
scope.addEventProcessor(event => { | |
event.transaction = context.functionName; | |
return event; | |
}); | |
scope.setTag('server_name', process.env._AWS_XRAY_DAEMON_ADDRESS || process.env.SENTRY_NAME || hostname()); | |
scope.setTag('url', `awslambda:///${context.functionName}`); | |
} |
Expected Result
The span should keep the name foo-name
Actual Result
The span name
is replaced with the name of the lambda function. The op
is untouched.
jwhitaker-gridcog
Metadata
Metadata
Assignees
Labels
Package: aws-serverlessIssues related to the Sentry AWS Serverless SDKIssues related to the Sentry AWS Serverless SDK
Type
Projects
Status
No status