Skip to content

Traces created by startSpan are not logged when using @sentry/nestjs #12771

Closed
@zoomkoding

Description

@zoomkoding

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.13.0

Framework Version

Nestjs 10.0.0

Link to Sentry event

No response

SDK Setup/Reproduction Example

No response

Steps to Reproduce

I tried to use startSpan, but it does not log anything in Sentry Traces.

This is how I initialized Sentry.

  Sentry.init({
    dsn: process.env.SENTRY_DSN,
    environment: process.env.NODE_ENV,
    integrations: [
      Sentry.extraErrorDataIntegration({ depth: 10 }),
      nodeProfilingIntegration(),
    ],
    tracesSampleRate: 1.0,
    profilesSampleRate: 1.0,
  });

This is how I used startSpan.

import * as Sentry from '@sentry/nestjs';

const a = () => {
  return Sentry.startSpan({ name: 'test', async () => {
     // do something
  })
}

Expected Result

traces are shown on the web.

Actual Result

No traces on the web.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nestjsIssues related to the Sentry Nestjs SDK

    Type

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions