Skip to content

Conversation

andreiborza
Copy link
Member

@andreiborza andreiborza commented Aug 5, 2024

Works by adding the Sentry middlware to your src/middleware.ts file:

import { sentryBeforeResponseMiddleware } from '@sentry/solidstart/middleware';
import { createMiddleware } from '@solidjs/start/middleware';

export default createMiddleware({
  onBeforeResponse: [
    sentryBeforeResponseMiddleware(),
    // Add your other middleware handlers after `sentryBeforeResponseMiddleware`
  ],
});

And specifying ./src/middleware.ts in app.config.ts

CleanShot 2024-08-05 at 08 51 51@2x

Closes: #12551

@andreiborza andreiborza added the Package: solidstart Issues related to the Sentry SolidStart SDK label Aug 5, 2024
@andreiborza andreiborza requested review from mydea, Lms24 and s1gr1d August 5, 2024 06:54
Copy link
Member

@s1gr1d s1gr1d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andreiborza andreiborza merged commit 4ebac94 into develop Aug 5, 2024
97 checks passed
@andreiborza andreiborza deleted the ab/solidstart-distributed-tracing-metatags branch August 5, 2024 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: solidstart Issues related to the Sentry SolidStart SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add trace metadata to solidstart template
3 participants