-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(nuxt): Inject sentry config with Nuxt addPluginTemplate
#12760
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
69dc0df
feat(nuxt): Add sentry config with plugin template
s1gr1d d802cb0
Merge branch 'develop' into sig/nuxt-plugin-template
s1gr1d ef1c2c4
review changes
s1gr1d 1cc6e02
Merge branch 'develop' into sig/nuxt-plugin-template
s1gr1d da48eac
Merge branch 'develop' into sig/nuxt-plugin-template
s1gr1d 09e5255
Merge branch 'develop' into sig/nuxt-plugin-template
s1gr1d 306a2d2
Merge branch 'develop' into sig/nuxt-plugin-template
s1gr1d 0d4a77a
revert package versions
s1gr1d File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export {}; | ||
export * from './server'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,17 @@ | ||
export * from './client'; | ||
import type { Integration, Options, StackParser } from '@sentry/types'; | ||
import type * as clientSdk from './index.client'; | ||
import type * as serverSdk from './index.server'; | ||
|
||
// We export everything from both the client part of the SDK and from the server part. Some of the exports collide, | ||
// which is not allowed, unless we re-export the colliding exports in this file - which we do below. | ||
export * from './index.client'; | ||
export * from './index.server'; | ||
|
||
// re-export colliding types | ||
export declare function init(options: Options | clientSdk.BrowserOptions | serverSdk.NodeOptions): void; | ||
export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration; | ||
export declare const contextLinesIntegration: typeof clientSdk.contextLinesIntegration; | ||
export declare const getDefaultIntegrations: (options: Options) => Integration[]; | ||
export declare const defaultStackParser: StackParser; | ||
export declare const continueTrace: typeof clientSdk.continueTrace; | ||
export declare const metrics: typeof clientSdk.metrics & typeof serverSdk.metrics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from '@sentry/node'; | ||
|
||
export { init } from './sdk'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { applySdkMetadata } from '@sentry/core'; | ||
import { init as initNode } from '@sentry/node'; | ||
import type { Client } from '@sentry/types'; | ||
import type { SentryNuxtOptions } from '../common/types'; | ||
|
||
/** | ||
* Initializes the server-side of the Nuxt SDK | ||
* | ||
* @param options Configuration options for the SDK. | ||
*/ | ||
export function init(options: SentryNuxtOptions): Client | undefined { | ||
const sentryOptions = { | ||
...options, | ||
}; | ||
|
||
applySdkMetadata(sentryOptions, 'nuxt', ['nuxt', 'node']); | ||
|
||
return initNode(sentryOptions); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know, is it normal for plugins like sentry to directly depend on nuxt kit or is it more like a peer dep thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw it as a dependency in other Nuxt modules and therefore added it there too