Skip to content

Can't see local variables on the sentry dashboard #13394

@zstiggz

Description

@zstiggz

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

8.26.0

Framework Version

No response

Link to Sentry event

https://visualelectric.sentry.io/share/issue/280ad0165d0b4e7f985ac7c5b26e7069/

Reproduction Example/SDK Setup

I can't see local variables logged in the sentry dashboard for my project.

Minimal example:

// test.js
import dotenv from 'dotenv'

if (process.env.NODE_ENV !== 'production') {
  dotenv.config({ path: '../.env' })
}
import * as Sentry from '@sentry/node'

Sentry.init({
  release: process.env.VE_SENTRY_RELEASE,
  dsn: process.env.VE_SERVER_SENTRY_DSN,
  environment: process.env.VE_ENVIRONMENT,
  includeLocalVariables: true,
})

function run() {
  console.log('test local vars...')
  const someVariable1 = undefined
  const someVariable2 = 2
  console.log(someVariable1.test)
}

run()

Steps to Reproduce

node test.js on the above example

Expected Result

I expect to be able to see the values of someVariable1 and someVariable2 in the sentry dashboard for the issue.

Actual Result

Image

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions