Skip to content

Nestjs Cron Checkin Failing to Upsert due to invalid payloadΒ #14128

@localpath

Description

@localpath

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nestjs

SDK Version

8.35.0

Framework Version

Nestjs 10.2.8

Link to Sentry event

No response

Reproduction Example/SDK Setup

Sentry.init({
  dsn: APP.SENTRY_DSN,
  environment: APP.ENVIRONMENT,
  ignoreErrors: ['Forbidden resource', 'Unauthorized'],
  integrations: [
    // Add our Profiling integration
    nodeProfilingIntegration(),
  ],

  // Set sampling rate for profiling
  // This is relative to tracesSampleRate
  profilesSampleRate: APP.SENTRY_PROFILES_SAMPLE_RATE,

  // Add Tracing by setting tracesSampleRate
  // We recommend adjusting this value in production
  tracesSampleRate: APP.SENTRY_TRACES_SAMPLE_RATE,

Steps to Reproduce

Using Nestjs Decorator for Cron monitoring and receiving an error that sentry cannot upsert the event due to an invalid payload but it seems correct.

@Cron(CronExpression.EVERY_5_MINUTES, {
    name: 'MyCron',
  })
  @SentryCron('MyCron')

Expected Result

It correctly upserts a new cron monitor for any new cron that we decorate in Nestjs.

Actual Result

Image

Image

Metadata

Metadata

Assignees

Labels

BugPackage: nestjsIssues related to the Sentry Nestjs SDK

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions