Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in the TraceView. probably regression Exceptions started to be shown out of their group and order. #12120

Open
3 tasks done
amiranvarov opened this issue May 20, 2024 · 3 comments

Comments

@amiranvarov
Copy link

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

7.116.0

Framework Version

express@^4.18.1

Link to Sentry event

https://amir-anvarov.sentry.io/share/issue/92e66980e5844d5baa96348c1a5247cd/

SDK Setup

Sentry.init({
		serverName: name,
		dsn: dsn,
		environment: env.node_env,
		enabled: true,
		debug: debug,
		integrations: [
			// enable HTTP calls tracing
			new Sentry.Integrations.Http({ tracing: true }),
			// enable Express.js middleware tracing
			new Tracing.Integrations.Express({ app }),
			new ProfilingIntegration(),
			...integrations,
		],
		beforeSend(event, hint) {
			const error = hint.originalException as Error;
			if (error?.message?.match(/database unavailable/i)) {
				event.fingerprint = ["database-unavailable"];
			}

			// Modify or drop the event here
			if (event.user) {
				// Don't send user's email address
				event.user.email = undefined;
			}

			return event;
		},

		// Called for transaction events
		beforeSendTransaction(event) {
			// Modify or drop the event here
			if (event.transaction === "/unimportant/route") {
				// Don't send the event to Sentry
				return null;
			}
			return event;
		},
		beforeBreadcrumb(breadcrumb, hint) {
			// Check if the breadcrumb has sensitive data like user email
			if (breadcrumb.data?.["user"]?.email) {
				// Remove the user email from the breadcrumb
				// Remove the user email from the breadcrumb
				breadcrumb.data["user"].email = undefined;
			}
			return breadcrumb;
		},
		includeLocalVariables: true,
		attachStacktrace: true,
		// Set tracesSampleRate to 1.0 to capture 100%
		// of transactions for performance monitoring.
		// We recommend adjusting this value in production
		tracesSampleRate: 1.0,
	});

Steps to Reproduce

Would be hard to give me instructions how to reproduce. You should set up microservice architecture app.

I think it would be easier if I share my screen with parts of my code with you as i can't expose my private repo itself.

before you tell me to look at my code search for issues there, i'll tell you I did it for the past 5 hours, i have been going trough my code to see if i broke something. i reverted back to commit when my sentry Trace view was perfectly showing me in the timeline where exactly exception was captured, in which of my microservice, after which span and etc. But even after i checked out that commit when sentry and my code was aligned perfectly, i'm still having an issue with how TraceView is displaying exceptions positon on my trace timeline. I am very confident that problem is not in my code.

Out of nowhere, Sentry right now is showing captured exceptions out of order and not correctly. I suspect maybe there was some issue with latest realese of traceview, on Sentry side.

Expected Result

Exceptions are being displayed in the order, in related group, just like it was a weegk ago

Actual Result

Exceptions started to be displayed out of order, out of the group
image

@mydea
Copy link
Member

mydea commented May 21, 2024

Hey,

to clarify, where did you encounter problems? What version worked, and what version stopped working for you?

@amiranvarov
Copy link
Author

hey, just described it in your Dicsord. Will copy and paste the screenshot:
image
image
image
image

@JonasBa
Copy link
Member

JonasBa commented May 21, 2024

@amiranvarov it would be helpful if you can send us a link to a trace where the events are ordered correctly vs when they are not as we need to look at the data to figure out what timestamps are reported.

It would be very weird if profiling had any impact on this as it does not change when issue timestamps are changed. Did you change anything around the docker image or sentry SDK with the change to downgrade the profiling SDK? In addition, could you provide us with that docker logfile so that we can see why it crashed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

4 participants