Closed as not planned
Description
openedon Sep 17, 2024
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/node
SDK Version
7.119.0
Framework Version
7.119.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
Sentry.init({
dsn: SENTRY_DSN,
attachStacktrace: true,
includeLocalVariables: true,
release: VERSION,
tracesSampler: ctx => {
console.log("tracesSampler ctx", ctx.custom)
return 0
},
profilesSampler: ctx => {
console.log("profilesSampler ctx", ctx.custom)
return 0
},
integrations: [
new Sentry.Integrations.LocalVariables({
captureAllExceptions: true,
}),
new Sentry.Integrations.ContextLines({
frameContextLines: 12, // Default is 7
}),
new Sentry.Integrations.Http({
tracing: true,
}),
// Enable node profiling
nodeProfilingIntegration(),
],
})
Steps to Reproduce
- Initialize Sentry with
tracesSampler
andprofilesSampler
callbacks. - Send custom context when starting transaction (
startTransaction
). - Get custom context in the
profilesSampler
callback.
const transaction = Sentry.getCurrentHub().startTransaction({ name: `XXX` }, { custom: 'XXX' }) as
| Sentry.Transaction
| undefined
Expected Result
Custom context is passed.
Actual Result
Custom context is not passed.
Metadata
Assignees
Type
Projects
Status
Waiting for: Community
Activity