Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
d70086b8
Unverified
Commit
d70086b8
authored
Jun 06, 2023
by
Joel
Committed by
GitHub
Jun 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: sentry to dify account (#299)
parent
a3ee037d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
12 deletions
+20
-12
.env.example
web/.env.example
+6
-1
next.config.js
web/next.config.js
+6
-5
package.json
web/package.json
+2
-0
sentry.client.config.js
web/sentry.client.config.js
+2
-2
sentry.edge.config.js
web/sentry.edge.config.js
+2
-2
sentry.server.config.js
web/sentry.server.config.js
+2
-2
No files found.
web/.env.example
View file @
d70086b8
...
@@ -10,3 +10,8 @@ NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api
...
@@ -10,3 +10,8 @@ NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api
# console or api domain.
# console or api domain.
# example: http://udify.app/api
# example: http://udify.app/api
NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api
NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api
# SENTRY
NEXT_PUBLIC_SENTRY_DSN=
NEXT_PUBLIC_SENTRY_ORG=
NEXT_PUBLIC_SENTRY_PROJECT=
\ No newline at end of file
web/next.config.js
View file @
d70086b8
const
{
withSentryConfig
}
=
require
(
'@sentry/nextjs'
)
const
{
withSentryConfig
}
=
require
(
'@sentry/nextjs'
)
const
EDITION
=
process
.
env
.
NEXT_PUBLIC_EDITION
const
IS_CE_EDITION
=
EDITION
===
'SELF_HOSTED'
const
isDevelopment
=
process
.
env
.
NODE_ENV
===
'development'
const
isDevelopment
=
process
.
env
.
NODE_ENV
===
'development'
const
isHideSentry
=
isDevelopment
||
IS_CE_EDITION
const
SENTRY_DSN
=
process
.
env
.
NEXT_PUBLIC_SENTRY_DSN
const
SENTRY_ORG
=
process
.
env
.
NEXT_PUBLIC_SENTRY_ORG
const
SENTRY_PROJECT
=
process
.
env
.
NEXT_PUBLIC_SENTRY_PROJECT
const
isHideSentry
=
isDevelopment
||
!
SENTRY_DSN
||
!
SENTRY_ORG
||
!
SENTRY_PROJECT
const
withMDX
=
require
(
'@next/mdx'
)({
const
withMDX
=
require
(
'@next/mdx'
)({
extension
:
/
\.
mdx
?
$/
,
extension
:
/
\.
mdx
?
$/
,
...
@@ -56,8 +57,8 @@ const nextConfig = {
...
@@ -56,8 +57,8 @@ const nextConfig = {
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup
const
sentryWebpackPluginOptions
=
{
const
sentryWebpackPluginOptions
=
{
org
:
'perfectworld'
,
org
:
SENTRY_ORG
,
project
:
'javascript-nextjs'
,
project
:
SENTRY_PROJECT
,
silent
:
true
,
// Suppresses all logs
silent
:
true
,
// Suppresses all logs
sourcemaps
:
{
sourcemaps
:
{
assets
:
'./**'
,
assets
:
'./**'
,
...
...
web/package.json
View file @
d70086b8
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
"prepare"
:
"cd ../ && husky install ./web/.husky"
"prepare"
:
"cd ../ && husky install ./web/.husky"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@babel/runtime"
:
"^7.22.3"
,
"@emoji-mart/data"
:
"^1.1.2"
,
"@emoji-mart/data"
:
"^1.1.2"
,
"@formatjs/intl-localematcher"
:
"^0.2.32"
,
"@formatjs/intl-localematcher"
:
"^0.2.32"
,
"@headlessui/react"
:
"^1.7.13"
,
"@headlessui/react"
:
"^1.7.13"
,
...
@@ -20,6 +21,7 @@
...
@@ -20,6 +21,7 @@
"@mdx-js/react"
:
"^2.3.0"
,
"@mdx-js/react"
:
"^2.3.0"
,
"@next/mdx"
:
"^13.2.4"
,
"@next/mdx"
:
"^13.2.4"
,
"@sentry/nextjs"
:
"^7.53.1"
,
"@sentry/nextjs"
:
"^7.53.1"
,
"@sentry/utils"
:
"^7.54.0"
,
"@tailwindcss/line-clamp"
:
"^0.4.2"
,
"@tailwindcss/line-clamp"
:
"^0.4.2"
,
"@types/crypto-js"
:
"^4.1.1"
,
"@types/crypto-js"
:
"^4.1.1"
,
"@types/lodash-es"
:
"^4.17.7"
,
"@types/lodash-es"
:
"^4.17.7"
,
...
...
web/sentry.client.config.js
View file @
d70086b8
import
*
as
Sentry
from
'@sentry/nextjs'
import
*
as
Sentry
from
'@sentry/nextjs'
Sentry
.
init
({
Sentry
.
init
({
dsn
:
'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648'
,
dsn
:
process
.
env
.
NEXT_PUBLIC_SENTRY_DSN
,
// Replay may only be enabled for the client-side
// Replay may only be enabled for the client-side
integrations
:
[
new
Sentry
.
Replay
()],
integrations
:
[
new
Sentry
.
Replay
()],
// Set tracesSampleRate to 1.0 to capture 100%
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// of transactions for performance monitoring.
// We recommend adjusting this value in production
// We recommend adjusting this value in production
tracesSampleRate
:
1.0
,
tracesSampleRate
:
0.1
,
// Capture Replay for 10% of all sessions,
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
// plus for 100% of sessions with an error
...
...
web/sentry.edge.config.js
View file @
d70086b8
import
*
as
Sentry
from
'@sentry/nextjs'
import
*
as
Sentry
from
'@sentry/nextjs'
Sentry
.
init
({
Sentry
.
init
({
dsn
:
'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648'
,
dsn
:
process
.
env
.
NEXT_PUBLIC_SENTRY_DSN
,
// Set tracesSampleRate to 1.0 to capture 100%
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// of transactions for performance monitoring.
// We recommend adjusting this value in production
// We recommend adjusting this value in production
tracesSampleRate
:
1.0
,
tracesSampleRate
:
0.1
,
// ...
// ...
...
...
web/sentry.server.config.js
View file @
d70086b8
import
*
as
Sentry
from
'@sentry/nextjs'
import
*
as
Sentry
from
'@sentry/nextjs'
Sentry
.
init
({
Sentry
.
init
({
dsn
:
'https://6bf48a450f054d749398c02a61bae343@o4505264807215104.ingest.sentry.io/4505264809115648'
,
dsn
:
process
.
env
.
NEXT_PUBLIC_SENTRY_DSN
,
// Set tracesSampleRate to 1.0 to capture 100%
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// of transactions for performance monitoring.
// We recommend adjusting this value in production
// We recommend adjusting this value in production
tracesSampleRate
:
1.0
,
tracesSampleRate
:
0.1
,
})
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment