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

Sessions/session data not being sent to Sentry? #225

Open
nunoarruda opened this issue Mar 11, 2024 · 0 comments
Open

Sessions/session data not being sent to Sentry? #225

nunoarruda opened this issue Mar 11, 2024 · 0 comments

Comments

@nunoarruda
Copy link

It looks like Toucan is not sending sessions/session data to Sentry. I see no session being recorded after I ran the worker several times:

no-sessions

Here's the worker TypeScript code:

import { Toucan } from 'toucan-js';

export interface Env {}

export default {
	async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
		const sentry = new Toucan({
			dsn: 'ADD_YOUR_DSN_HERE',
			context: ctx,
			request,
			release: 'fetch',
		});

		try {
			// throw new Error('This is a test error');
			return new Response('Hello World!');
		} catch (error) {
			sentry.captureException(error);
			return new Response('Internal Server Error', { status: 500 });
		}
	},
};

Is this a bug?
Or, perhaps, a feature missing from Toucan?
Or, perhaps, I am missing something?

Thanks in advance 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant