ghost 5.36.1 → 5.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/tryghost-adapter-cache-memory-ttl-5.37.0.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.37.0.tgz +0 -0
- package/components/tryghost-adapter-manager-5.37.0.tgz +0 -0
- package/components/tryghost-api-framework-5.37.0.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.37.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.37.0.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.37.0.tgz +0 -0
- package/components/tryghost-constants-5.37.0.tgz +0 -0
- package/components/{tryghost-custom-theme-settings-service-5.36.1.tgz → tryghost-custom-theme-settings-service-5.37.0.tgz} +0 -0
- package/components/tryghost-data-generator-5.37.0.tgz +0 -0
- package/components/tryghost-domain-events-5.37.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.37.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.37.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.37.0.tgz +0 -0
- package/components/tryghost-email-content-generator-5.37.0.tgz +0 -0
- package/components/tryghost-email-events-5.37.0.tgz +0 -0
- package/components/{tryghost-email-service-5.36.1.tgz → tryghost-email-service-5.37.0.tgz} +0 -0
- package/components/tryghost-email-suppression-list-5.37.0.tgz +0 -0
- package/components/tryghost-event-aware-cache-wrapper-5.37.0.tgz +0 -0
- package/components/{tryghost-express-dynamic-redirects-5.36.1.tgz → tryghost-express-dynamic-redirects-5.37.0.tgz} +0 -0
- package/components/tryghost-external-media-inliner-5.37.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.37.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.37.0.tgz +0 -0
- package/components/tryghost-i18n-5.37.0.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.37.0.tgz +0 -0
- package/components/tryghost-importer-revue-5.37.0.tgz +0 -0
- package/components/{tryghost-job-manager-5.36.1.tgz → tryghost-job-manager-5.37.0.tgz} +0 -0
- package/components/tryghost-link-redirects-5.37.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.37.0.tgz +0 -0
- package/components/tryghost-link-tracking-5.37.0.tgz +0 -0
- package/components/tryghost-magic-link-5.37.0.tgz +0 -0
- package/components/tryghost-mailgun-client-5.37.0.tgz +0 -0
- package/components/{tryghost-member-attribution-5.36.1.tgz → tryghost-member-attribution-5.37.0.tgz} +0 -0
- package/components/tryghost-member-events-5.37.0.tgz +0 -0
- package/components/tryghost-members-api-5.37.0.tgz +0 -0
- package/components/tryghost-members-csv-5.37.0.tgz +0 -0
- package/components/{tryghost-members-events-service-5.36.1.tgz → tryghost-members-events-service-5.37.0.tgz} +0 -0
- package/components/tryghost-members-importer-5.37.0.tgz +0 -0
- package/components/{tryghost-members-offers-5.36.1.tgz → tryghost-members-offers-5.37.0.tgz} +0 -0
- package/components/tryghost-members-payments-5.37.0.tgz +0 -0
- package/components/{tryghost-members-ssr-5.36.1.tgz → tryghost-members-ssr-5.37.0.tgz} +0 -0
- package/components/tryghost-members-stripe-service-5.37.0.tgz +0 -0
- package/components/tryghost-milestones-5.37.0.tgz +0 -0
- package/components/tryghost-minifier-5.37.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.37.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.37.0.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.37.0.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.37.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.37.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.37.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.37.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.37.0.tgz +0 -0
- package/components/tryghost-package-json-5.37.0.tgz +0 -0
- package/components/tryghost-referrers-5.37.0.tgz +0 -0
- package/components/tryghost-security-5.37.0.tgz +0 -0
- package/components/tryghost-session-service-5.37.0.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.37.0.tgz +0 -0
- package/components/tryghost-slack-notifications-5.37.0.tgz +0 -0
- package/components/{tryghost-staff-service-5.36.1.tgz → tryghost-staff-service-5.37.0.tgz} +0 -0
- package/components/tryghost-stats-service-5.37.0.tgz +0 -0
- package/components/tryghost-tiers-5.37.0.tgz +0 -0
- package/components/tryghost-update-check-service-5.37.0.tgz +0 -0
- package/components/tryghost-verification-trigger-5.37.0.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.37.0.tgz +0 -0
- package/components/tryghost-webmentions-5.37.0.tgz +0 -0
- package/content/themes/casper/assets/built/screen.css +1 -1
- package/content/themes/casper/assets/built/screen.css.map +1 -1
- package/content/themes/casper/assets/css/screen.css +44 -30
- package/content/themes/casper/default.hbs +2 -2
- package/content/themes/casper/error.hbs +2 -2
- package/content/themes/casper/package.json +1 -1
- package/core/boot.js +4 -2
- package/core/built/admin/assets/chunk.143.27cd10a38f877e715b35.js +49 -0
- package/core/built/admin/assets/chunk.178.dd6cf17fb0986acf19d6.js +10 -0
- package/core/built/admin/assets/{chunk.502.800e1515996bcc900013.js → chunk.652.bb618bc5abf23bed4e87.js} +855 -784
- package/core/built/admin/assets/{chunk.79.53e8aa9671b2d5dae8ba.js → chunk.79.4a959c324df25480b90e.js} +191 -184
- package/core/built/admin/assets/{ghost-b828e9e3c161aae92909c2e163656bb1.js → ghost-2948791640be026b987b88f89034bc85.js} +260 -238
- package/core/built/admin/assets/ghost-dark-6ea4b338f17a43c204b7c1e207b90cd7.css +1 -0
- package/core/built/admin/assets/ghost-efbe4dcc249d119a955b038aae5c980d.css +1 -0
- package/core/built/admin/assets/{vendor-c4684647d4f5213e5dbb6763de430e7e.js → vendor-b982e3bf1020bff77b2a3c44d5f59e55.js} +176 -191
- package/core/built/admin/index.html +6 -6
- package/core/frontend/apps/amp/lib/helpers/amp_content.js +1 -5
- package/core/frontend/meta/asset-url.js +9 -0
- package/core/server/api/endpoints/db.js +17 -0
- package/core/server/api/endpoints/mentions.js +2 -1
- package/core/server/api/endpoints/utils/serializers/output/posts.js +2 -2
- package/core/server/data/db/backup.js +13 -13
- package/core/server/data/importer/handlers/image.js +2 -2
- package/core/server/data/importer/import-manager.js +56 -4
- package/core/server/data/importer/importers/ContentFileImporter.js +128 -0
- package/core/server/data/schema/commands.js +21 -10
- package/core/server/models/mention.js +13 -0
- package/core/server/run-update-check.js +3 -1
- package/core/server/services/media-inliner/index.js +1 -0
- package/core/server/services/media-inliner/service.js +16 -0
- package/core/server/services/members/stats/members-stats.js +13 -9
- package/core/server/services/mentions/BookshelfMentionRepository.js +12 -1
- package/core/server/services/mentions/MentionController.js +7 -1
- package/core/server/services/mentions/WebmentionMetadata.js +3 -2
- package/core/server/services/mentions/service.js +1 -4
- package/core/server/{analytics-events.js → services/segment/index.js} +4 -3
- package/core/server/services/stripe/config.js +4 -0
- package/core/server/update-check.js +5 -3
- package/core/server/web/api/endpoints/admin/app.js +5 -4
- package/core/server/web/api/endpoints/admin/routes.js +6 -0
- package/core/server/web/api/middleware/index.js +1 -2
- package/core/shared/config/overrides.json +34 -0
- package/core/shared/labs.js +3 -2
- package/package.json +153 -148
- package/yarn.lock +765 -820
- package/components/tryghost-adapter-cache-memory-ttl-5.36.1.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.36.1.tgz +0 -0
- package/components/tryghost-adapter-manager-5.36.1.tgz +0 -0
- package/components/tryghost-api-framework-5.36.1.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.36.1.tgz +0 -0
- package/components/tryghost-audience-feedback-5.36.1.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.36.1.tgz +0 -0
- package/components/tryghost-constants-5.36.1.tgz +0 -0
- package/components/tryghost-data-generator-5.36.1.tgz +0 -0
- package/components/tryghost-domain-events-5.36.1.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.36.1.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.36.1.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.36.1.tgz +0 -0
- package/components/tryghost-email-content-generator-5.36.1.tgz +0 -0
- package/components/tryghost-email-events-5.36.1.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.36.1.tgz +0 -0
- package/components/tryghost-event-aware-cache-wrapper-5.36.1.tgz +0 -0
- package/components/tryghost-extract-api-key-5.36.1.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.36.1.tgz +0 -0
- package/components/tryghost-i18n-5.36.1.tgz +0 -0
- package/components/tryghost-importer-revue-5.36.1.tgz +0 -0
- package/components/tryghost-link-redirects-5.36.1.tgz +0 -0
- package/components/tryghost-link-replacer-5.36.1.tgz +0 -0
- package/components/tryghost-link-tracking-5.36.1.tgz +0 -0
- package/components/tryghost-magic-link-5.36.1.tgz +0 -0
- package/components/tryghost-mailgun-client-5.36.1.tgz +0 -0
- package/components/tryghost-member-events-5.36.1.tgz +0 -0
- package/components/tryghost-members-api-5.36.1.tgz +0 -0
- package/components/tryghost-members-csv-5.36.1.tgz +0 -0
- package/components/tryghost-members-importer-5.36.1.tgz +0 -0
- package/components/tryghost-members-payments-5.36.1.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.36.1.tgz +0 -0
- package/components/tryghost-milestones-5.36.1.tgz +0 -0
- package/components/tryghost-minifier-5.36.1.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.36.1.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.36.1.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.36.1.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.36.1.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.36.1.tgz +0 -0
- package/components/tryghost-mw-vhost-5.36.1.tgz +0 -0
- package/components/tryghost-oembed-service-5.36.1.tgz +0 -0
- package/components/tryghost-package-json-5.36.1.tgz +0 -0
- package/components/tryghost-referrers-5.36.1.tgz +0 -0
- package/components/tryghost-security-5.36.1.tgz +0 -0
- package/components/tryghost-session-service-5.36.1.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.36.1.tgz +0 -0
- package/components/tryghost-slack-notifications-5.36.1.tgz +0 -0
- package/components/tryghost-stats-service-5.36.1.tgz +0 -0
- package/components/tryghost-tiers-5.36.1.tgz +0 -0
- package/components/tryghost-update-check-service-5.36.1.tgz +0 -0
- package/components/tryghost-verification-trigger-5.36.1.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.36.1.tgz +0 -0
- package/components/tryghost-webmentions-5.36.1.tgz +0 -0
- package/core/built/admin/assets/chunk.143.26ea9f26571d656653f0.js +0 -49
- package/core/built/admin/assets/chunk.178.dd71b3a764b73facc400.js +0 -11
- package/core/built/admin/assets/ghost-7ecf5c7934d90798485ee5ac2956f7fe.css +0 -1
- package/core/built/admin/assets/ghost-dark-e50717df8e57d3e7fee67a0bcea895ad.css +0 -1
- package/core/frontend/src/cards/css/before-after.css +0 -81
- package/core/frontend/src/cards/js/before-after.js +0 -36
- package/core/server/data/importer/importers/image.js +0 -76
- package/core/server/data/schema/clients/index.js +0 -7
- package/core/server/data/schema/clients/mysql.js +0 -34
- package/core/server/data/schema/clients/sqlite3.js +0 -39
- package/core/server/services/mentions/WebmentionRequest.js +0 -20
- package/core/server/web/admin/middleware.js +0 -17
- package/core/server/web/api/middleware/version-match.js +0 -31
- /package/core/built/admin/assets/{chunk.502.800e1515996bcc900013.js.LICENSE.txt → chunk.652.bb618bc5abf23bed4e87.js.LICENSE.txt} +0 -0
|
@@ -1,247 +1,255 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[79],{
|
|
2
|
-
var i=n(8651)
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[79],{12058:(t,e,n)=>{n.d(e,{z:()=>s})
|
|
2
|
+
var i=n(8651)
|
|
3
|
+
function s(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1
|
|
4
|
+
const e=(0,i.Gd)().getClient(),n=t||e&&e.getOptions()
|
|
5
|
+
return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}},38285:(t,e,n)=>{n.d(e,{ro:()=>f,lb:()=>m})
|
|
6
|
+
var i=n(12058),s=n(8651),a=n(88521),r=n(16140),o=n(30180),c=n(8142),_=n(48206)
|
|
7
|
+
function d(){const t=(0,_.x1)()
|
|
8
|
+
if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}var l=n(27448),p=n(21535)
|
|
9
|
+
function u(){const t=this.getScope()
|
|
6
10
|
if(t){const e=t.getSpan()
|
|
7
|
-
if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function
|
|
11
|
+
if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function h(t,e,n){if(!(0,i.z)(e))return t.sampled=!1,t
|
|
8
12
|
if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t
|
|
9
|
-
let
|
|
10
|
-
return"function"==typeof e.tracesSampler?(
|
|
11
|
-
var
|
|
13
|
+
let s
|
|
14
|
+
return"function"==typeof e.tracesSampler?(s=e.tracesSampler(n),t.setMetadata({sampleRate:Number(s)})):void 0!==n.parentSampled?s=n.parentSampled:void 0!==e.tracesSampleRate?(s=e.tracesSampleRate,t.setMetadata({sampleRate:Number(s)})):(s=1,t.setMetadata({sampleRate:s})),o=s,((0,r.i2)(o)||"number"!=typeof o&&"boolean"!=typeof o?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),0):!(o<0||o>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${o}.`),0))?s?(t.sampled=Math.random()<s,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)
|
|
15
|
+
var o}function g(t,e){const n=this.getClient(),i=n&&n.getOptions()||{},s=i.instrumenter||"sentry",r=t.instrumenter||"sentry"
|
|
12
16
|
s!==r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.error(`A transaction was started with instrumenter=\`${r}\`, but the SDK is configured with the \`${s}\` instrumenter.\nThe transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`),t.sampled=!1)
|
|
13
17
|
let o=new p.Y(t,this)
|
|
14
|
-
return o=
|
|
15
|
-
let _=new
|
|
16
|
-
return _=
|
|
17
|
-
t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=
|
|
18
|
+
return o=h(o,i,{parentSampled:t.parentSampled,transactionContext:t,...e}),o.sampled&&o.initSpanRecorder(i._experiments&&i._experiments.maxSpans),o}function m(t,e,n,i,s,a,r){const o=t.getClient(),c=o&&o.getOptions()||{}
|
|
19
|
+
let _=new l.io(e,t,n,i,r,s)
|
|
20
|
+
return _=h(_,c,{parentSampled:e.parentSampled,transactionContext:e,...a}),_.sampled&&_.initSpanRecorder(c._experiments&&c._experiments.maxSpans),_}function f(){!function(){const t=(0,s.cu)()
|
|
21
|
+
t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=g),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=u))}(),(0,o.KV)()&&function(){const e=(0,s.cu)()
|
|
18
22
|
if(!e.__SENTRY__)return
|
|
19
|
-
const n={mongodb:()=>new((0,
|
|
20
|
-
|
|
21
|
-
var i=n(88468),
|
|
23
|
+
const n={mongodb:()=>new((0,o.l$)(t,"./integrations/node/mongo").Mongo),mongoose:()=>new((0,o.l$)(t,"./integrations/node/mongo").Mongo)({mongoose:!0}),mysql:()=>new((0,o.l$)(t,"./integrations/node/mysql").Mysql),pg:()=>new((0,o.l$)(t,"./integrations/node/postgres").Postgres)},i=Object.keys(n).filter((t=>!!(0,o.$y)(t))).map((t=>{try{return n[t]()}catch(t){return}})).filter((t=>t))
|
|
24
|
+
i.length>0&&(e.__SENTRY__.integrations=[...e.__SENTRY__.integrations||[],...i])}(),(0,c.o)("error",d),(0,c.o)("unhandledrejection",d)}t=n.hmd(t)},27448:(t,e,n)=>{n.d(e,{hd:()=>_,io:()=>l,mg:()=>c,nT:()=>o})
|
|
25
|
+
var i=n(88468),s=n(88521),a=n(20484),r=n(21535)
|
|
22
26
|
const o=1e3,c=3e4,_=5e3
|
|
23
|
-
class d extends
|
|
24
|
-
super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=
|
|
25
|
-
if(this._finished=!0,this.activities={},this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
27
|
+
class d extends a.gB{constructor(t,e,n,i){super(i),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:(0,i._I)(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class l extends r.Y{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._beforeFinishCallbacks=[]}constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:_,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5]
|
|
28
|
+
super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=a,this._onScope=r,l.prototype.__init.call(this),l.prototype.__init2.call(this),l.prototype.__init3.call(this),l.prototype.__init4.call(this),r&&(p(e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope((t=>t.setSpan(this)))),this._startIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this.finish())}),this._finalTimeout)}finish(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i._I)()
|
|
29
|
+
if(this._finished=!0,this.activities={},this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op)
|
|
26
30
|
for(const e of this._beforeFinishCallbacks)e(this,t)
|
|
27
31
|
this.spanRecorder.spans=this.spanRecorder.spans.filter((e=>{if(e.spanId===this.spanId)return!0
|
|
28
|
-
e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
32
|
+
e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)))
|
|
29
33
|
const n=e.startTimestamp<t
|
|
30
|
-
return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
31
|
-
return this._onScope&&
|
|
32
|
-
this.spanRecorder=new d(e,n,this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
34
|
+
return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n})),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] No active IdleTransaction")
|
|
35
|
+
return this._onScope&&p(this._idleHub),super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const e=t=>{this._finished||this._pushActivity(t)},n=t=>{this._finished||this._popActivity(t)}
|
|
36
|
+
this.spanRecorder=new d(e,n,this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}_cancelIdleTimeout(){this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0)}_startIdleTimeout(t){this._cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||this.finish(t)}),this._idleTimeout)}_pushActivity(t){this._cancelIdleTimeout(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=(0,i._I)()+this._idleTimeout/1e3
|
|
33
37
|
this._startIdleTimeout(t)}}_beat(){if(this._finished)return
|
|
34
38
|
const t=Object.keys(this.activities).join("")
|
|
35
|
-
t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&
|
|
36
|
-
e&&e.getTransaction()&&e.setSpan(void 0)}},98079:(t,e,n)=>{n.r(e),n.d(e,{BROWSER_TRACING_INTEGRATION_ID:()=>
|
|
39
|
+
t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function p(t){const e=t.getScope()
|
|
40
|
+
e&&e.getTransaction()&&e.setSpan(void 0)}},98079:(t,e,n)=>{n.r(e),n.d(e,{BROWSER_TRACING_INTEGRATION_ID:()=>nt,BrowserTracing:()=>st,IdleTransaction:()=>B.io,Integrations:()=>i,Span:()=>ot.Dr,SpanStatus:()=>rt,TRACEPARENT_REGEXP:()=>b.K,Transaction:()=>ct.Y,addExtensionMethods:()=>s.ro,defaultRequestInstrumentationOptions:()=>tt,extractTraceparentData:()=>b.q,getActiveTransaction:()=>G.x1,hasTracingEnabled:()=>G.zu,instrumentOutgoingRequests:()=>et,spanStatusfromHttpCode:()=>ot.Zd,startIdleTransaction:()=>s.lb,stripUrlQueryAndFragment:()=>o.rt})
|
|
37
41
|
var i={}
|
|
38
|
-
n.r(i),n.d(i,{Apollo:()=>R,BrowserTracing:()=>
|
|
39
|
-
var
|
|
40
|
-
function
|
|
41
|
-
for(;i<t.length;){const
|
|
42
|
-
if(i+=2,("optionalAccess"===
|
|
43
|
-
"access"===
|
|
42
|
+
n.r(i),n.d(i,{Apollo:()=>R,BrowserTracing:()=>st,Express:()=>l,GraphQL:()=>y,Mongo:()=>E,Mysql:()=>m,Postgres:()=>g,Prisma:()=>S})
|
|
43
|
+
var s=n(38285)
|
|
44
|
+
function a(t){let e,n=t[0],i=1
|
|
45
|
+
for(;i<t.length;){const s=t[i],a=t[i+1]
|
|
46
|
+
if(i+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return
|
|
47
|
+
"access"===s||"optionalAccess"===s?(e=n,n=a(n)):"call"!==s&&"optionalCall"!==s||(n=a((function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s]
|
|
44
48
|
return n.call(e,...i)})),e=void 0)}return n}var r=n(88521),o=n(72702),c=n(14205),_=n(16140)
|
|
45
|
-
function d(t){const e=
|
|
46
|
-
return"sentry"!==(
|
|
47
|
-
|
|
48
|
-
return t[e]=function(){for(var t=arguments.length,i=new Array(t),
|
|
49
|
-
return n.call(this,...function(t,e){return t.map((t=>"function"==typeof t?
|
|
49
|
+
function d(t){const e=a([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()])
|
|
50
|
+
return"sentry"!==(a([e,"optionalAccess",t=>t.instrumenter])||"sentry")}class l{static __initStatic(){this.id="Express"}__init(){this.name=l.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
51
|
+
l.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Express Integration is skipped because of instrumenter configuration."):(function(t){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).forEach((e=>function(t,e){const n=t[e]
|
|
52
|
+
return t[e]=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s]
|
|
53
|
+
return n.call(this,...function(t,e){return t.map((t=>"function"==typeof t?p(t,e):Array.isArray(t)?t.map((t=>"function"==typeof t?p(t,e):t)):t))}(i,e))},t}(t,e)))}(this._router,this._methods),function(t){const e="settings"in t
|
|
50
54
|
e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter()
|
|
51
55
|
const n=e?t._router:t
|
|
52
56
|
if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.debug("Routing instrumentation is currently only supported in Express 4."))
|
|
53
|
-
const i=Object.getPrototypeOf(n),
|
|
57
|
+
const i=Object.getPrototypeOf(n),s=i.process_params
|
|
54
58
|
i.process_params=function(t,e,n,i,r){n._reconstructedRoute||(n._reconstructedRoute="")
|
|
55
|
-
const{layerRoutePath:d,isRegex:
|
|
59
|
+
const{layerRoutePath:d,isRegex:l,isArray:p,numExtraSegments:u}=function(t){const e=a([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=(0,_.Kj)(e),i=Array.isArray(e)
|
|
56
60
|
if(!e)return{isRegex:n,isArray:i,numExtraSegments:0}
|
|
57
|
-
const
|
|
58
|
-
return{layerRoutePath:r,isRegex:n,isArray:i,numExtraSegments:
|
|
59
|
-
const h=(d||t.path||"").split("/").filter((t=>t.length>0&&(p
|
|
60
|
-
if(h&&h.length>0&&(n._reconstructedRoute+=`/${h}${
|
|
61
|
+
const s=i?Math.max(e.reduce(((t,e)=>t+(0,o.$A)(e.toString())),0)-(0,o.$A)(t.path||""),0):0,r=function(t,e){return t?e.map((t=>t.toString())).join(","):e&&e.toString()}(i,e)
|
|
62
|
+
return{layerRoutePath:r,isRegex:n,isArray:i,numExtraSegments:s}}(t);(d||l||p)&&(n._hasParameters=!0)
|
|
63
|
+
const h=(d||t.path||"").split("/").filter((t=>t.length>0&&(l||p||!t.includes("*")))).join("/")
|
|
64
|
+
if(h&&h.length>0&&(n._reconstructedRoute+=`/${h}${l?"/":""}`),(0,o.$A)(n.originalUrl||"")+u===(0,o.$A)(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl)
|
|
61
65
|
const t=i.__sentry_transaction
|
|
62
66
|
if(t&&"custom"!==t.metadata.source){const e=n._reconstructedRoute||"/"
|
|
63
|
-
t.setName(...(0,c.oA)(n,{path:!0,method:!0,customRoute:e}))}}return
|
|
64
|
-
switch(n){case 2:return function(n,i){const
|
|
65
|
-
if(
|
|
67
|
+
t.setName(...(0,c.oA)(n,{path:!0,method:!0,customRoute:e}))}}return s.call(this,t,e,n,i,r)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("ExpressIntegration is missing an Express instance")}}function p(t,e){const n=t.length
|
|
68
|
+
switch(n){case 2:return function(n,i){const s=i.__sentry_transaction
|
|
69
|
+
if(s){const n=s.startChild({description:t.name,op:`middleware.express.${e}`})
|
|
66
70
|
i.once("finish",(()=>{n.finish()}))}return t.call(this,n,i)}
|
|
67
|
-
case 3:return function(n,i,
|
|
68
|
-
t.call(this,n,i,(function(){
|
|
71
|
+
case 3:return function(n,i,s){const r=a([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})])
|
|
72
|
+
t.call(this,n,i,(function(){a([r,"optionalAccess",t=>t.finish,"call",t=>t()])
|
|
69
73
|
for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n]
|
|
70
|
-
|
|
71
|
-
case 4:return function(n,i,
|
|
72
|
-
t.call(this,n,i,
|
|
74
|
+
s.call(this,...e)}))}
|
|
75
|
+
case 4:return function(n,i,s,r){const o=a([s.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})])
|
|
76
|
+
t.call(this,n,i,s,(function(){a([o,"optionalAccess",t=>t.finish,"call",t=>t()])
|
|
73
77
|
for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n]
|
|
74
78
|
r.call(this,...e)}))}
|
|
75
|
-
default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}
|
|
79
|
+
default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}l.__initStatic()
|
|
76
80
|
var u=n(30180),h=n(15834)
|
|
77
|
-
class
|
|
78
|
-
|
|
81
|
+
class g{static __initStatic(){this.id="Postgres"}__init(){this.name=g.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
82
|
+
g.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Postgres Integration is skipped because of instrumenter configuration."))
|
|
79
83
|
const n=(0,u.$y)("pg")
|
|
80
84
|
if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to require `pg` package."))
|
|
81
|
-
if(this._usePgNative&&!
|
|
82
|
-
const{Client:i}=this._usePgNative?n.native:n;(0,h.hl)(i.prototype,"query",(function(t){return function(n,i,
|
|
83
|
-
if("function"==typeof
|
|
84
|
-
if("function"==typeof i)return t.call(this,n,(function(t,e){
|
|
85
|
+
if(this._usePgNative&&!a([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Postgres Integration was unable to access 'pg-native' bindings."))
|
|
86
|
+
const{Client:i}=this._usePgNative?n.native:n;(0,h.hl)(i.prototype,"query",(function(t){return function(n,i,s){const r=a([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=a([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db"})])
|
|
87
|
+
if("function"==typeof s)return t.call(this,n,i,(function(t,e){a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e)}))
|
|
88
|
+
if("function"==typeof i)return t.call(this,n,(function(t,e){a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)}))
|
|
85
89
|
const c=void 0!==i?t.call(this,n,i):t.call(this,n)
|
|
86
|
-
return(0,_.J8)(c)?c.then((t=>(
|
|
87
|
-
class
|
|
90
|
+
return(0,_.J8)(c)?c.then((t=>(a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)}}))}}g.__initStatic()
|
|
91
|
+
class m{constructor(){m.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=m.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mysql Integration is skipped because of instrumenter configuration."))
|
|
88
92
|
const n=(0,u.$y)("mysql/lib/Connection.js")
|
|
89
|
-
n?(0,h.hl)(n,"createQuery",(function(t){return function(n,i,
|
|
90
|
-
return"function"==typeof
|
|
93
|
+
n?(0,h.hl)(n,"createQuery",(function(t){return function(n,i,s){const r=a([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),o=a([r,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db"})])
|
|
94
|
+
return"function"==typeof s?t.call(this,n,i,(function(t,e,n){a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e,n)})):"function"==typeof i?t.call(this,n,(function(t,e,n){a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)})):t.call(this,n,i,s)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Mysql Integration was unable to require `mysql` package.")}}m.__initStatic()
|
|
91
95
|
const f=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],T={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]}
|
|
92
96
|
class E{static __initStatic(){this.id="Mongo"}__init(){this.name=E.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
93
97
|
E.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:f,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Mongo Integration is skipped because of instrumenter configuration."))
|
|
94
98
|
const n=this._useMongoose?"mongoose":"mongodb",i=(0,u.$y)(n)
|
|
95
99
|
i?this._instrumentOperations(i.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error(`Mongo Integration was unable to require \`${n}\` package.`)}_instrumentOperations(t,e,n){e.forEach((e=>this._patchOperation(t,e,n)))}_patchOperation(t,e,n){if(!(e in t.prototype))return
|
|
96
|
-
const i=this._getSpanContextFromOperationArguments.bind(this);(0,h.hl)(t.prototype,e,(function(t){return function(){for(var
|
|
97
|
-
const c=r[r.length-1],d=
|
|
98
|
-
if("function"!=typeof c||"mapReduce"===e&&2===r.length){const n=
|
|
99
|
-
if((0,_.J8)(
|
|
100
|
-
if((
|
|
101
|
-
try{e.once("close",(()=>{
|
|
102
|
-
const
|
|
103
|
-
return t.call(this,...r.slice(0,-1),(function(t,e){
|
|
104
|
-
if(!
|
|
100
|
+
const i=this._getSpanContextFromOperationArguments.bind(this);(0,h.hl)(t.prototype,e,(function(t){return function(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o]
|
|
101
|
+
const c=r[r.length-1],d=a([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()])
|
|
102
|
+
if("function"!=typeof c||"mapReduce"===e&&2===r.length){const n=a([d,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r))]),s=t.call(this,...r)
|
|
103
|
+
if((0,_.J8)(s))return s.then((t=>(a([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t)))
|
|
104
|
+
if((l=s)&&"object"==typeof l&&l.once&&"function"==typeof l.once){const e=s
|
|
105
|
+
try{e.once("close",(()=>{a([n,"optionalAccess",t=>t.finish,"call",t=>t()])}))}catch(t){a([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return e}return a([n,"optionalAccess",t=>t.finish,"call",t=>t()]),s}var l
|
|
106
|
+
const p=a([d,"optionalAccess",t=>t.startChild,"call",t=>t(i(this,e,r.slice(0,-1)))])
|
|
107
|
+
return t.call(this,...r.slice(0,-1),(function(t,e){a([p,"optionalAccess",t=>t.finish,"call",t=>t()]),c(t,e)}))}}))}_getSpanContextFromOperationArguments(t,e,n){const i={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace},s={op:"db",description:e,data:i},a=T[e],r=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations
|
|
108
|
+
if(!a||!r)return s
|
|
105
109
|
try{if("mapReduce"===e){const[t,e]=n
|
|
106
|
-
i[
|
|
110
|
+
i[a[0]]="string"==typeof t?t:t.name||"<anonymous>",i[a[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<a.length;t++)i[a[t]]=JSON.stringify(n[t])}catch(t){}return s}}E.__initStatic()
|
|
107
111
|
class S{static __initStatic(){this.id="Prisma"}__init(){this.name=S.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
|
|
108
112
|
var e
|
|
109
|
-
S.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use(((t,n)=>{const i=
|
|
110
|
-
return(0,_.J8)(c)?c.then((t=>(
|
|
113
|
+
S.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?d(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use(((t,n)=>{const i=a([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=t.action,r=t.model,o=a([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:r?`${r} ${s}`:s,op:"db.sql.prisma"})]),c=n(t)
|
|
114
|
+
return(0,_.J8)(c)?c.then((t=>(a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(a([o,"optionalAccess",t=>t.finish,"call",t=>t()]),c)})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("PrismaIntegration is missing a Prisma Client Instance")}}S.__initStatic()
|
|
111
115
|
class y{constructor(){y.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=y.id}setupOnce(t,e){if(d(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("GraphQL Integration is skipped because of instrumenter configuration."))
|
|
112
116
|
const n=(0,u.$y)("graphql/execution/execute.js")
|
|
113
|
-
n?(0,h.hl)(n,"execute",(function(t){return function(){const n=e().getScope(),i=
|
|
114
|
-
|
|
117
|
+
n?(0,h.hl)(n,"execute",(function(t){return function(){const n=e().getScope(),i=a([n,"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=a([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})])
|
|
118
|
+
a([n,"optionalAccess",t=>t.setSpan,"call",t=>t(s)])
|
|
115
119
|
for(var r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c]
|
|
116
120
|
const d=t.call(this,...o)
|
|
117
|
-
return(0,_.J8)(d)?d.then((t=>(
|
|
121
|
+
return(0,_.J8)(d)?d.then((t=>(a([s,"optionalAccess",t=>t.finish,"call",t=>t()]),a([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t))):(a([s,"optionalAccess",t=>t.finish,"call",t=>t()]),a([n,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),d)}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("GraphQL Integration was unable to require graphql/execution package.")}}y.__initStatic()
|
|
118
122
|
var v=n(7209)
|
|
119
|
-
class R{
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
class R{static __initStatic(){this.id="Apollo"}__init(){this.name=R.id}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{useNestjs:!1}
|
|
124
|
+
R.prototype.__init.call(this),this._useNest=!!t.useNestjs}setupOnce(t,e){if(d(e))("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("Apollo Integration is skipped because of instrumenter configuration.")
|
|
125
|
+
else if(this._useNest){const t=(0,u.$y)("@nestjs/graphql")
|
|
126
|
+
if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."));(0,h.hl)(t.GraphQLFactory.prototype,"mergeWithSchema",(function(t){return function(){(0,h.hl)(this.resolversExplorerService,"explore",(function(t){return function(){return N((0,v.lE)(t.call(this)),e)}}))
|
|
127
|
+
for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s]
|
|
128
|
+
return t.call(this,...i)}}))}else{const t=(0,u.$y)("apollo-server-core")
|
|
129
|
+
if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error("Apollo Integration was unable to require apollo-server-core package."));(0,h.hl)(t.ApolloServerBase.prototype,"constructSchema",(function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?(r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),r.kg.warn()):this.config.modules&&r.kg.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),r.kg.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this)
|
|
122
130
|
const n=(0,v.lE)(this.config.resolvers)
|
|
123
|
-
return this.config.resolvers=n.map((t=>(Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((i=>{"function"==typeof t[n][i]&&function(t,e,n,i){(0,h.hl)(t[e],n,(function(t){return function(){const a
|
|
131
|
+
return this.config.resolvers=N(n,e),t.call(this)}}))}}}function N(t,e){return t.map((t=>(Object.keys(t).forEach((n=>{Object.keys(t[n]).forEach((i=>{"function"==typeof t[n][i]&&function(t,e,n,i){(0,h.hl)(t[e],n,(function(t){return function(){const s=a([i().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),r=a([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})])
|
|
124
132
|
for(var o=arguments.length,c=new Array(o),d=0;d<o;d++)c[d]=arguments[d]
|
|
125
|
-
const
|
|
126
|
-
return(0,_.J8)(
|
|
127
|
-
var b=n(75492),D=n(22850),
|
|
128
|
-
const
|
|
133
|
+
const l=t.call(this,...c)
|
|
134
|
+
return(0,_.J8)(l)?l.then((t=>(a([r,"optionalAccess",t=>t.finish,"call",t=>t()]),t))):(a([r,"optionalAccess",t=>t.finish,"call",t=>t()]),l)}}))}(t,n,i,e)}))})),t)))}R.__initStatic()
|
|
135
|
+
var b=n(75492),D=n(22850),k=n(68256),B=n(27448),G=n(48206)
|
|
136
|
+
const Y=n(27083).n2
|
|
129
137
|
var U=n(88468)
|
|
130
|
-
const
|
|
131
|
-
return
|
|
138
|
+
const x=(t,e,n)=>{let i,s
|
|
139
|
+
return a=>{e.value>=0&&(a||n)&&(s=e.value-(i||0),(s||void 0===i)&&(i=e.value,e.delta=s,t(e)))}},I=()=>Y.__WEB_VITALS_POLYFILL__?Y.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Y.performance.timing,e=Y.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"}
|
|
132
140
|
for(const i in t)"navigationStart"!==i&&"toJSON"!==i&&(n[i]=Math.max(t[i]-t.navigationStart,0))
|
|
133
|
-
return n})()):
|
|
134
|
-
return t&&t.activationStart||0},
|
|
141
|
+
return n})()):Y.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],A=()=>{const t=I()
|
|
142
|
+
return t&&t.activationStart||0},C=(t,e)=>{const n=I()
|
|
135
143
|
let i="navigate"
|
|
136
|
-
return n&&(i=
|
|
137
|
-
return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},
|
|
144
|
+
return n&&(i=Y.document.prerendering||A()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},O=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const i=new PerformanceObserver((t=>{e(t.getEntries())}))
|
|
145
|
+
return i.observe(Object.assign({type:t,buffered:!0},n||{})),i}}catch(t){}},w=(t,e)=>{const n=i=>{"pagehide"!==i.type&&"hidden"!==Y.document.visibilityState||(t(i),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))}
|
|
138
146
|
addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)}
|
|
139
|
-
let
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
function
|
|
143
|
-
return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function
|
|
144
|
-
function
|
|
145
|
-
o&&r&&
|
|
146
|
-
const
|
|
147
|
-
function
|
|
148
|
-
e&&(0,
|
|
147
|
+
let $=-1
|
|
148
|
+
const L=()=>($<0&&($="hidden"!==Y.document.visibilityState||Y.document.prerendering?1/0:0,w((t=>{let{timeStamp:e}=t
|
|
149
|
+
$=e}),!0)),{get firstHiddenTime(){return $}}),M={}
|
|
150
|
+
function P(t){return"number"==typeof t&&isFinite(t)}function q(t,e){let{startTimestamp:n,...i}=e
|
|
151
|
+
return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...i})}function H(){return Y&&Y.addEventListener&&Y.performance}let j,F,z=0,X={}
|
|
152
|
+
function J(t,e,n,i,s,a){const r=a?e[a]:e[`${n}End`],o=e[`${n}Start`]
|
|
153
|
+
o&&r&&q(t,{op:"browser",description:s||n,startTimestamp:i+(0,G.XL)(o),endTimestamp:i+(0,G.XL)(r)})}var Q=n(12058),W=n(8651),Z=n(8142),K=n(98902)
|
|
154
|
+
const V=["localhost",/^\//],tt={traceFetch:!0,traceXHR:!0,tracingOrigins:V,tracePropagationTargets:V}
|
|
155
|
+
function et(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:i,tracingOrigins:s,shouldCreateSpanForRequest:a}={traceFetch:tt.traceFetch,traceXHR:tt.traceXHR,...t},r="function"==typeof a?a:t=>!0,o=t=>function(t,e){return(0,K.U0)(t,e||V)}(t,i||s),c={}
|
|
156
|
+
e&&(0,Z.o)("fetch",(t=>{!function(t,e,n,i){if(!(0,Q.z)()||!t.fetchData||!e(t.fetchData.url))return
|
|
149
157
|
if(t.endTimestamp){const e=t.fetchData.__span
|
|
150
158
|
if(!e)return
|
|
151
159
|
const n=i[e]
|
|
152
|
-
return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete i[e]))}const
|
|
153
|
-
if(
|
|
160
|
+
return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete i[e]))}const s=(0,W.Gd)().getScope(),a=s&&s.getSpan(),r=a&&a.transaction
|
|
161
|
+
if(a&&r){const e=a.startChild({data:{...t.fetchData,type:"fetch"},description:`${t.fetchData.method} ${t.fetchData.url}`,op:"http.client"})
|
|
154
162
|
t.fetchData.__span=e.spanId,i[e.spanId]=e
|
|
155
|
-
const
|
|
163
|
+
const s=t.args[0]
|
|
156
164
|
t.args[1]=t.args[1]||{}
|
|
157
165
|
const o=t.args[1]
|
|
158
|
-
n(t.fetchData.url)&&(o.headers=function(t,e,n,i){const
|
|
166
|
+
n(t.fetchData.url)&&(o.headers=function(t,e,n,i){const s=(0,D.IQ)(e),a=n.toTraceparent(),r="undefined"!=typeof Request&&(0,_.V9)(t,Request)?t.headers:i.headers
|
|
159
167
|
if(r){if("undefined"!=typeof Headers&&(0,_.V9)(r,Headers)){const t=new Headers(r)
|
|
160
|
-
return t.append("sentry-trace",
|
|
161
|
-
return
|
|
162
|
-
return Array.isArray(t)?e.push(...t):t&&e.push(t),
|
|
163
|
-
const
|
|
168
|
+
return t.append("sentry-trace",a),s&&t.append(D.bU,s),t}if(Array.isArray(r)){const t=[...r,["sentry-trace",a]]
|
|
169
|
+
return s&&t.push([D.bU,s]),t}{const t="baggage"in r?r.baggage:void 0,e=[]
|
|
170
|
+
return Array.isArray(t)?e.push(...t):t&&e.push(t),s&&e.push(s),{...r,"sentry-trace":a,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":a,baggage:s}}(s,r.getDynamicSamplingContext(),e,o))}}(t,r,o,c)})),n&&(0,Z.o)("xhr",(t=>{!function(t,e,n,i){if(!(0,Q.z)()||t.xhr&&t.xhr.__sentry_own_request__||!(t.xhr&&t.xhr.__sentry_xhr__&&e(t.xhr.__sentry_xhr__.url)))return
|
|
171
|
+
const s=t.xhr.__sentry_xhr__
|
|
164
172
|
if(t.endTimestamp){const e=t.xhr.__sentry_xhr_span_id__
|
|
165
173
|
if(!e)return
|
|
166
174
|
const n=i[e]
|
|
167
|
-
return void(n&&(n.setHttpStatus(
|
|
168
|
-
if(r&&o){const e=r.startChild({data:{...
|
|
175
|
+
return void(n&&(n.setHttpStatus(s.status_code),n.finish(),delete i[e]))}const a=(0,W.Gd)().getScope(),r=a&&a.getSpan(),o=r&&r.transaction
|
|
176
|
+
if(r&&o){const e=r.startChild({data:{...s.data,type:"xhr",method:s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client"})
|
|
169
177
|
if(t.xhr.__sentry_xhr_span_id__=e.spanId,i[t.xhr.__sentry_xhr_span_id__]=e,t.xhr.setRequestHeader&&n(t.xhr.__sentry_xhr__.url))try{t.xhr.setRequestHeader("sentry-trace",e.toTraceparent())
|
|
170
178
|
const n=o.getDynamicSamplingContext(),i=(0,D.IQ)(n)
|
|
171
|
-
i&&t.xhr.setRequestHeader(D.bU,i)
|
|
172
|
-
if(!
|
|
173
|
-
let i,
|
|
174
|
-
e&&(i=t({name:
|
|
175
|
-
void 0===s
|
|
176
|
-
class
|
|
177
|
-
t&&U.Z1&&(t.mark&&
|
|
178
|
-
let n,i=0,
|
|
179
|
-
const
|
|
180
|
-
i&&0!==
|
|
181
|
-
r&&(n=
|
|
182
|
-
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS"),
|
|
179
|
+
i&&t.xhr.setRequestHeader(D.bU,i)}catch(t){}}}(t,r,o,c)}))}const nt="BrowserTracing",it={idleTimeout:B.nT,finalTimeout:B.mg,heartbeatInterval:B.hd,markBackgroundTransactions:!0,routingInstrumentation:function(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2]
|
|
180
|
+
if(!Y||!Y.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("Could not initialize routing instrumentation due to invalid location"))
|
|
181
|
+
let i,s=Y.location.href
|
|
182
|
+
e&&(i=t({name:Y.location.pathname,op:"pageload",metadata:{source:"url"}})),n&&(0,Z.o)("history",(e=>{let{to:n,from:a}=e
|
|
183
|
+
void 0===a&&s&&-1!==s.indexOf(n)?s=void 0:a!==n&&(s=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=t({name:Y.location.pathname,op:"navigation",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...tt}
|
|
184
|
+
class st{__init(){this.name=nt}constructor(t){st.prototype.__init.call(this),this.options={...it,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),function(){const t=H()
|
|
185
|
+
t&&U.Z1&&(t.mark&&Y.performance.mark("sentry-tracing-init"),(t=>{const e=C("CLS",0)
|
|
186
|
+
let n,i=0,s=[]
|
|
187
|
+
const a=t=>{t.forEach((t=>{if(!t.hadRecentInput){const a=s[0],r=s[s.length-1]
|
|
188
|
+
i&&0!==s.length&&t.startTime-r.startTime<1e3&&t.startTime-a.startTime<5e3?(i+=t.value,s.push(t)):(i=t.value,s=[t]),i>e.value&&(e.value=i,e.entries=s,n&&n())}}))},r=O("layout-shift",a)
|
|
189
|
+
r&&(n=x(t,e),w((()=>{a(r.takeRecords()),n(!0)})))})((t=>{const e=t.entries.pop()
|
|
190
|
+
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS"),X.cls={value:t.value,unit:""},F=e)})),(t=>{const e=L(),n=C("LCP")
|
|
183
191
|
let i
|
|
184
|
-
const
|
|
185
|
-
if(
|
|
186
|
-
t<e.firstHiddenTime&&(n.value=t,n.entries=[
|
|
187
|
-
if(
|
|
188
|
-
const e=()=>{
|
|
189
|
-
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP"),
|
|
192
|
+
const s=t=>{const s=t[t.length-1]
|
|
193
|
+
if(s){const t=Math.max(s.startTime-A(),0)
|
|
194
|
+
t<e.firstHiddenTime&&(n.value=t,n.entries=[s],i())}},a=O("largest-contentful-paint",s)
|
|
195
|
+
if(a){i=x(t,n)
|
|
196
|
+
const e=()=>{M[n.id]||(s(a.takeRecords()),a.disconnect(),M[n.id]=!0,i(!0))};["keydown","click"].forEach((t=>{addEventListener(t,e,{once:!0,capture:!0})})),w(e,!0)}})((t=>{const e=t.entries.pop()
|
|
197
|
+
e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP"),X.lcp={value:t.value,unit:"millisecond"},j=e)})),(t=>{const e=L(),n=C("FID")
|
|
190
198
|
let i
|
|
191
|
-
const
|
|
192
|
-
i=
|
|
199
|
+
const s=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),i(!0))},a=t=>{t.forEach(s)},r=O("first-input",a)
|
|
200
|
+
i=x(t,n),r&&w((()=>{a(r.takeRecords()),r.disconnect()}),!0)})((t=>{const e=t.entries.pop()
|
|
193
201
|
if(!e)return
|
|
194
|
-
const n=(0,
|
|
202
|
+
const n=(0,G.XL)(U.Z1),i=(0,G.XL)(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FID"),X.fid={value:t.value,unit:"millisecond"},X["mark.fid"]={value:n+i,unit:"second"}})))}(),this.options.enableLongTask&&O("longtask",(t=>{for(const e of t){const t=(0,G.x1)()
|
|
195
203
|
if(!t)return
|
|
196
|
-
const n=(0,
|
|
204
|
+
const n=(0,G.XL)(U.Z1+e.startTime),i=(0,G.XL)(e.duration)
|
|
197
205
|
t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+i})}}))}setupOnce(t,e){this._getCurrentHub=e
|
|
198
|
-
const{routingInstrumentation:n,startTransactionOnLocationChange:i,startTransactionOnPageLoad:
|
|
199
|
-
n((t=>this._createRouteTransaction(t)),
|
|
200
|
-
if(
|
|
201
|
-
const{beforeNavigate:e,idleTimeout:n,finalTimeout:i,heartbeatInterval:
|
|
202
|
-
h.metadata=h.name!==
|
|
203
|
-
const
|
|
204
|
-
return f.registerBeforeFinishCallback((t=>{!function(t){const e=
|
|
205
|
-
if(!e||!
|
|
206
|
-
const n=(0,
|
|
207
|
-
let a
|
|
208
|
-
if(i.slice(
|
|
209
|
-
if(!("navigation"===t.op&&n+i<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{
|
|
206
|
+
const{routingInstrumentation:n,startTransactionOnLocationChange:i,startTransactionOnPageLoad:s,markBackgroundTransactions:a,traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d,_experiments:l}=this.options
|
|
207
|
+
n((t=>this._createRouteTransaction(t)),s,i),a&&(Y&&Y.document?Y.document.addEventListener("visibilitychange",(()=>{const t=(0,G.x1)()
|
|
208
|
+
if(Y.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("[Tracing] Could not set up background tab detection due to lack of global document")),l.enableInteractions&&this._registerInteractionListener(),et({traceFetch:o,traceXHR:c,tracePropagationTargets:_,shouldCreateSpanForRequest:d})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`))
|
|
209
|
+
const{beforeNavigate:e,idleTimeout:n,finalTimeout:i,heartbeatInterval:a}=this.options,o="pageload"===t.op,c=o?at("sentry-trace"):null,_=o?at("baggage"):null,d=c?(0,b.q)(c):void 0,l=_?(0,D.EN)(_):void 0,p={...t,...d,metadata:{...t.metadata,dynamicSamplingContext:d&&!l?{}:l},trimEnd:!0},u="function"==typeof e?e(p):p,h=void 0===u?{...p,sampled:!1}:u
|
|
210
|
+
h.metadata=h.name!==p.name?{...h.metadata,source:"custom"}:h.metadata,this._latestRouteName=h.name,this._latestRouteSource=h.metadata&&h.metadata.source,!1===h.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Tracing] Starting ${h.op} transaction on scope`)
|
|
211
|
+
const g=this._getCurrentHub(),{location:m}=Y,f=(0,s.lb)(g,h,n,i,!0,{location:m},a)
|
|
212
|
+
return f.registerBeforeFinishCallback((t=>{!function(t){const e=H()
|
|
213
|
+
if(!e||!Y.performance.getEntries||!U.Z1)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Tracing] Adding & adjusting spans using Performance API")
|
|
214
|
+
const n=(0,G.XL)(U.Z1),i=e.getEntries()
|
|
215
|
+
let s,a
|
|
216
|
+
if(i.slice(z).forEach((e=>{const i=(0,G.XL)(e.startTime),o=(0,G.XL)(e.duration)
|
|
217
|
+
if(!("navigation"===t.op&&n+i<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{J(t,e,i,n)})),J(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),J(t,e,"fetch",n,"cache","domainLookupStart"),J(t,e,"domainLookup",n,"DNS"),function(t,e,n){q(t,{op:"browser",description:"request",startTimestamp:n+(0,G.XL)(e.requestStart),endTimestamp:n+(0,G.XL)(e.responseEnd)}),q(t,{op:"browser",description:"response",startTimestamp:n+(0,G.XL)(e.responseStart),endTimestamp:n+(0,G.XL)(e.responseEnd)})}(t,e,n)}(t,e,n),s=n+(0,G.XL)(e.responseStart),a=n+(0,G.XL)(e.requestStart)
|
|
210
218
|
break
|
|
211
|
-
case"mark":case"paint":case"measure":{!function(t,e,n,i,
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
"first-paint"===e.name&&
|
|
215
|
-
break}case"resource":{const
|
|
216
|
-
!function(t,e,n,i,a
|
|
219
|
+
case"mark":case"paint":case"measure":{!function(t,e,n,i,s){const a=s+n,r=a+i
|
|
220
|
+
q(t,{description:e.name,endTimestamp:r,op:e.entryType,startTimestamp:a})}(t,e,i,o,n)
|
|
221
|
+
const s=L(),a=e.startTime<s.firstHiddenTime
|
|
222
|
+
"first-paint"===e.name&&a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FP"),X.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding FCP"),X.fcp={value:e.startTime,unit:"millisecond"})
|
|
223
|
+
break}case"resource":{const s=e.name.replace(Y.location.origin,"")
|
|
224
|
+
!function(t,e,n,i,s,a){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return
|
|
217
225
|
const r={}
|
|
218
|
-
"transferSize"in e&&(r["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(r["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(r["Decoded Body Size"]=e.decodedBodySize)
|
|
219
|
-
const o=
|
|
220
|
-
|
|
221
|
-
break}}})),
|
|
226
|
+
"transferSize"in e&&(r["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(r["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(r["Decoded Body Size"]=e.decodedBodySize),"renderBlockingStatus"in e&&(r["resource.render_blocking_status"]=e.renderBlockingStatus)
|
|
227
|
+
const o=a+i
|
|
228
|
+
q(t,{description:n,endTimestamp:o+s,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:r})}(t,e,s,i,o,n)
|
|
229
|
+
break}}})),z=Math.max(i.length-1,0),function(t){const e=Y.navigator
|
|
222
230
|
if(!e)return
|
|
223
231
|
const n=e.connection
|
|
224
|
-
n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),
|
|
225
|
-
const i=
|
|
226
|
-
const e=
|
|
227
|
-
e&&
|
|
228
|
-
const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:i}=this.options,
|
|
229
|
-
if(t&&(t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${
|
|
230
|
-
if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${
|
|
231
|
-
const o=this._getCurrentHub(),{location:c}=
|
|
232
|
-
t=(0,
|
|
233
|
-
return e?e.getAttribute("content"):null}var
|
|
234
|
-
!function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(
|
|
235
|
-
var
|
|
236
|
-
var i=n(7209),
|
|
232
|
+
n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),P(n.rtt)&&(X["connection.rtt"]={value:n.rtt,unit:"millisecond"})),P(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),P(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding TTFB"),X.ttfb={value:1e3*(s-t.startTimestamp),unit:"millisecond"},"number"==typeof a&&a<=s&&(X["ttfb.requestTime"]={value:1e3*(s-a),unit:"millisecond"})),["fcp","fp","lcp"].forEach((e=>{if(!X[e]||n>=t.startTimestamp)return
|
|
233
|
+
const i=X[e].value,s=n+(0,G.XL)(i),a=Math.abs(1e3*(s-t.startTimestamp)),o=a-i;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log(`[Measurements] Normalized ${e} from ${i} to ${a} (${o})`),X[e].value=a}))
|
|
234
|
+
const e=X["mark.fid"]
|
|
235
|
+
e&&X.fid&&(q(t,{description:"first input delay",endTimestamp:e.value+(0,G.XL)(X.fid.value),op:"ui.action",startTimestamp:e.value}),delete X["mark.fid"]),"fcp"in X||delete X.cls,Object.keys(X).forEach((e=>{t.setMeasurement(e,X[e].value,X[e].unit)})),function(t){j&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding LCP Data"),j.element&&t.setTag("lcp.element",(0,k.Rt)(j.element)),j.id&&t.setTag("lcp.id",j.id),j.url&&t.setTag("lcp.url",j.url.trim().slice(0,200)),t.setTag("lcp.size",j.size)),F&&F.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.log("[Measurements] Adding CLS Data"),F.sources.forEach(((e,n)=>t.setTag(`cls.source.${n+1}`,(0,k.Rt)(e.node)))))}(t)}j=void 0,F=void 0,X={}}(t)})),f}_registerInteractionListener(){let t
|
|
236
|
+
const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:i}=this.options,a="ui.action.click"
|
|
237
|
+
if(t&&(t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`))
|
|
238
|
+
if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`))
|
|
239
|
+
const o=this._getCurrentHub(),{location:c}=Y,_={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}}
|
|
240
|
+
t=(0,s.lb)(o,_,e,n,!0,{location:c},i)};["click"].forEach((t=>{addEventListener(t,e,{once:!1,capture:!0})}))}}function at(t){const e=(0,k.qT)(`meta[name=${t}]`)
|
|
241
|
+
return e?e.getAttribute("content"):null}var rt,ot=n(20484)
|
|
242
|
+
!function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"}(rt||(rt={}))
|
|
243
|
+
var ct=n(21535);("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(0,s.ro)()},20484:(t,e,n)=>{n.d(e,{Dr:()=>c,Zd:()=>_,gB:()=>o})
|
|
244
|
+
var i=n(7209),s=n(88468),a=n(88521),r=n(15834)
|
|
237
245
|
class o{__init(){this.spans=[]}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3
|
|
238
|
-
o.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class c{__init2(){this.traceId=(0,i.DM)()}__init3(){this.spanId=(0,i.DM)().substring(16)}__init4(){this.startTimestamp=(0,
|
|
246
|
+
o.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class c{__init2(){this.traceId=(0,i.DM)()}__init3(){this.spanId=(0,i.DM)().substring(16)}__init4(){this.startTimestamp=(0,s._I)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(c.prototype.__init2.call(this),c.prototype.__init3.call(this),c.prototype.__init4.call(this),c.prototype.__init5.call(this),c.prototype.__init6.call(this),c.prototype.__init7.call(this),!t)return this
|
|
239
247
|
t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new c({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId})
|
|
240
248
|
if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`
|
|
241
|
-
e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},
|
|
249
|
+
e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},a.kg.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t))
|
|
242
250
|
const e=_(t)
|
|
243
251
|
return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId]
|
|
244
|
-
t&&
|
|
252
|
+
t&&a.kg.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:(0,s._I)()}toTraceparent(){let t=""
|
|
245
253
|
return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${t}`}toContext(){return(0,r.Jr)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return(0,r.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return(0,r.Jr)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function _(t){if(t<400&&t>=100)return"ok"
|
|
246
254
|
if(t>=400&&t<500)switch(t){case 401:return"unauthenticated"
|
|
247
255
|
case 403:return"permission_denied"
|
|
@@ -252,28 +260,27 @@ case 429:return"resource_exhausted"
|
|
|
252
260
|
default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented"
|
|
253
261
|
case 503:return"unavailable"
|
|
254
262
|
case 504:return"deadline_exceeded"
|
|
255
|
-
default:return"internal_error"}return"unknown_error"}},21535:(t,e,n)=>{n.d(e,{Y:()=>
|
|
256
|
-
var i=n(8651),
|
|
257
|
-
class
|
|
263
|
+
default:return"internal_error"}return"unknown_error"}},21535:(t,e,n)=>{n.d(e,{Y:()=>o})
|
|
264
|
+
var i=n(8651),s=n(88521),a=n(15834),r=n(20484)
|
|
265
|
+
class o extends r.Dr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),o.prototype.__init.call(this),o.prototype.__init2.call(this),o.prototype.__init3.call(this),this._hub=e||(0,i.Gd)(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this
|
|
258
266
|
const n=this.metadata.dynamicSamplingContext
|
|
259
267
|
n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"custom"
|
|
260
|
-
|
|
261
|
-
this.spanRecorder||(this.spanRecorder=new
|
|
268
|
+
this._name=t,this.metadata.source=e}initSpanRecorder(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3
|
|
269
|
+
this.spanRecorder||(this.spanRecorder=new r.gB(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:""
|
|
262
270
|
this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return
|
|
263
271
|
if(this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t),!0!==this.sampled){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.")
|
|
264
272
|
const t=this._hub.getClient()
|
|
265
273
|
return void(t&&t.recordDroppedEvent("sample_rate","transaction"))}const e=this.spanRecorder?this.spanRecorder.spans.filter((t=>t!==this&&t.endTimestamp)):[]
|
|
266
274
|
this._trimEnd&&e.length>0&&(this.endTimestamp=e.reduce(((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t)).endTimestamp)
|
|
267
|
-
const n=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:e,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...n,dynamicSamplingContext:this.getDynamicSamplingContext()},...n.source&&{transaction_info:{source:n.source
|
|
275
|
+
const n=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:e,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...n,dynamicSamplingContext:this.getDynamicSamplingContext()},...n.source&&{transaction_info:{source:n.source}}}
|
|
268
276
|
return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){const t=super.toContext()
|
|
269
|
-
return(0,
|
|
277
|
+
return(0,a.Jr)({...t,name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext
|
|
270
278
|
const t=this._hub||(0,i.Gd)(),e=t&&t.getClient()
|
|
271
279
|
if(!e)return{}
|
|
272
|
-
const{environment:n,release:
|
|
273
|
-
return(0,
|
|
274
|
-
var i=n(8651)
|
|
275
|
-
function a(t){
|
|
276
|
-
return
|
|
277
|
-
return e&&e.getTransaction()}function r(t){return t/1e3}}}])
|
|
280
|
+
const{environment:n,release:s}=e.getOptions()||{},{publicKey:r}=e.getDsn()||{},o=this.metadata.sampleRate,c=void 0!==o?o.toString():void 0,_=t.getScope(),{segment:d}=_&&_.getUser()||{},l=this.metadata.source,p=l&&"url"!==l?this.name:void 0
|
|
281
|
+
return(0,a.Jr)({environment:n,release:s,transaction:p,user_segment:d,public_key:r,trace_id:this.traceId,sample_rate:c})}}},48206:(t,e,n)=>{n.d(e,{XL:()=>o,x1:()=>r,zu:()=>a})
|
|
282
|
+
var i=n(12058),s=n(8651)
|
|
283
|
+
function a(t){return(0,i.z)(t)}function r(t){const e=(t||(0,s.Gd)()).getScope()
|
|
284
|
+
return e&&e.getTransaction()}function o(t){return t/1e3}}}])
|
|
278
285
|
|
|
279
|
-
//# sourceMappingURL=chunk.79.
|
|
286
|
+
//# sourceMappingURL=chunk.79.4a959c324df25480b90e.map
|