sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

@sentry/bun or reporting any span data

Open nzapponi opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
  • [X] I have reviewed the documentation https://docs.sentry.io/
  • [X] 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/bun

SDK Version

8.13.0

Framework Version

No response

Link to Sentry event

No response

SDK Setup/Reproduction Example

Entrypoint line 1:

import "./sentry.ts"

sentry.ts

import { SocketIoInstrumentation } from "@opentelemetry/instrumentation-socket.io";
import * as Sentry from "@sentry/bun";
import data from "../../../package.json";
import { SENTRY_DSN, SENTRY_ENVIRONMENT } from "./const";

Sentry.init({
  dsn: SENTRY_DSN,
  tracesSampleRate: 1.0,
  environment: SENTRY_ENVIRONMENT,
  release: data.version,
});

Sentry.addOpenTelemetryInstrumentation(new SocketIoInstrumentation());

Steps to Reproduce

  1. Start the bun server (which uses Express)
  2. Make an API call from the client (or curl) to the server

Expected Result

A trace of the API call from request to response, including all the middleware calls, database queries (I'm using pg), etc.

Actual Result

I get a trace, but every transaction just says "Empty - Transaction did not report any span data" This also happens on server-side events that I instrumented using await Sentry.startSpan(...): I get a trace that the span is there, but no data within it.

Screenshot 2024-06-30 at 16 05 21

nzapponi avatar Jun 30 '24 15:06 nzapponi