@sentry/solidstart 8.25.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/LICENSE +21 -0
- package/README.md +219 -0
- package/build/cjs/client/index.js +19 -0
- package/build/cjs/client/index.js.map +1 -0
- package/build/cjs/client/sdk.js +20 -0
- package/build/cjs/client/sdk.js.map +1 -0
- package/build/cjs/client/solidrouter.js +17 -0
- package/build/cjs/client/solidrouter.js.map +1 -0
- package/build/cjs/common/debug-build.js +11 -0
- package/build/cjs/common/debug-build.js.map +1 -0
- package/build/cjs/index.client.js +19 -0
- package/build/cjs/index.client.js.map +1 -0
- package/build/cjs/index.server.js +134 -0
- package/build/cjs/index.server.js.map +1 -0
- package/build/cjs/middleware.js +54 -0
- package/build/cjs/middleware.js.map +1 -0
- package/build/cjs/server/index.js +134 -0
- package/build/cjs/server/index.js.map +1 -0
- package/build/cjs/server/sdk.js +22 -0
- package/build/cjs/server/sdk.js.map +1 -0
- package/build/cjs/server/solidrouter.js +44 -0
- package/build/cjs/server/solidrouter.js.map +1 -0
- package/build/cjs/server/utils.js +67 -0
- package/build/cjs/server/utils.js.map +1 -0
- package/build/cjs/server/withServerActionInstrumentation.js +63 -0
- package/build/cjs/server/withServerActionInstrumentation.js.map +1 -0
- package/build/cjs/solidrouter.client.js +17 -0
- package/build/cjs/solidrouter.client.js.map +1 -0
- package/build/cjs/solidrouter.js +19 -0
- package/build/cjs/solidrouter.js.map +1 -0
- package/build/cjs/solidrouter.server.js +8 -0
- package/build/cjs/solidrouter.server.js.map +1 -0
- package/build/esm/client/index.js +3 -0
- package/build/esm/client/index.js.map +1 -0
- package/build/esm/client/sdk.js +18 -0
- package/build/esm/client/sdk.js.map +1 -0
- package/build/esm/client/solidrouter.js +2 -0
- package/build/esm/client/solidrouter.js.map +1 -0
- package/build/esm/common/debug-build.js +9 -0
- package/build/esm/common/debug-build.js.map +1 -0
- package/build/esm/index.client.js +3 -0
- package/build/esm/index.client.js.map +1 -0
- package/build/esm/index.server.js +6 -0
- package/build/esm/index.server.js.map +1 -0
- package/build/esm/middleware.js +52 -0
- package/build/esm/middleware.js.map +1 -0
- package/build/esm/package.json +1 -0
- package/build/esm/server/index.js +6 -0
- package/build/esm/server/index.js.map +1 -0
- package/build/esm/server/sdk.js +20 -0
- package/build/esm/server/sdk.js.map +1 -0
- package/build/esm/server/solidrouter.js +42 -0
- package/build/esm/server/solidrouter.js.map +1 -0
- package/build/esm/server/utils.js +60 -0
- package/build/esm/server/utils.js.map +1 -0
- package/build/esm/server/withServerActionInstrumentation.js +61 -0
- package/build/esm/server/withServerActionInstrumentation.js.map +1 -0
- package/build/esm/solidrouter.client.js +2 -0
- package/build/esm/solidrouter.client.js.map +1 -0
- package/build/esm/solidrouter.js +3 -0
- package/build/esm/solidrouter.js.map +1 -0
- package/build/esm/solidrouter.server.js +2 -0
- package/build/esm/solidrouter.server.js.map +1 -0
- package/build/types/client/index.d.ts +3 -0
- package/build/types/client/index.d.ts.map +1 -0
- package/build/types/client/sdk.d.ts +7 -0
- package/build/types/client/sdk.d.ts.map +1 -0
- package/build/types/common/debug-build.d.ts +7 -0
- package/build/types/common/debug-build.d.ts.map +1 -0
- package/build/types/index.client.d.ts +2 -0
- package/build/types/index.client.d.ts.map +1 -0
- package/build/types/index.server.d.ts +2 -0
- package/build/types/index.server.d.ts.map +1 -0
- package/build/types/index.types.d.ts +18 -0
- package/build/types/index.types.d.ts.map +1 -0
- package/build/types/server/index.d.ts +6 -0
- package/build/types/server/index.d.ts.map +1 -0
- package/build/types/server/sdk.d.ts +6 -0
- package/build/types/server/sdk.d.ts.map +1 -0
- package/build/types/server/utils.d.ts +15 -0
- package/build/types/server/utils.d.ts.map +1 -0
- package/build/types/server/withServerActionInstrumentation.d.ts +6 -0
- package/build/types/server/withServerActionInstrumentation.d.ts.map +1 -0
- package/client/solidrouter.d.ts +2 -0
- package/client/solidrouter.d.ts.map +1 -0
- package/middleware.d.ts +11 -0
- package/middleware.d.ts.map +1 -0
- package/package.json +134 -0
- package/server/solidrouter.d.ts +8 -0
- package/server/solidrouter.d.ts.map +1 -0
- package/solidrouter.client.d.ts +2 -0
- package/solidrouter.client.d.ts.map +1 -0
- package/solidrouter.d.ts +5 -0
- package/solidrouter.d.ts.map +1 -0
- package/solidrouter.server.d.ts +2 -0
- package/solidrouter.server.d.ts.map +1 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const node = require('@sentry/node');
|
|
4
|
+
const solid = require('@sentry/solid');
|
|
5
|
+
const sdk = require('./sdk.js');
|
|
6
|
+
const withServerActionInstrumentation = require('./withServerActionInstrumentation.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.DEFAULT_USER_INCLUDES = node.DEFAULT_USER_INCLUDES;
|
|
11
|
+
exports.NodeClient = node.NodeClient;
|
|
12
|
+
exports.SDK_VERSION = node.SDK_VERSION;
|
|
13
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = node.SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
14
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = node.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
15
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = node.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE;
|
|
16
|
+
exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = node.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
|
|
17
|
+
exports.Scope = node.Scope;
|
|
18
|
+
exports.addBreadcrumb = node.addBreadcrumb;
|
|
19
|
+
exports.addEventProcessor = node.addEventProcessor;
|
|
20
|
+
exports.addIntegration = node.addIntegration;
|
|
21
|
+
exports.addOpenTelemetryInstrumentation = node.addOpenTelemetryInstrumentation;
|
|
22
|
+
exports.addRequestDataToEvent = node.addRequestDataToEvent;
|
|
23
|
+
exports.anrIntegration = node.anrIntegration;
|
|
24
|
+
exports.captureCheckIn = node.captureCheckIn;
|
|
25
|
+
exports.captureConsoleIntegration = node.captureConsoleIntegration;
|
|
26
|
+
exports.captureEvent = node.captureEvent;
|
|
27
|
+
exports.captureException = node.captureException;
|
|
28
|
+
exports.captureFeedback = node.captureFeedback;
|
|
29
|
+
exports.captureMessage = node.captureMessage;
|
|
30
|
+
exports.captureSession = node.captureSession;
|
|
31
|
+
exports.close = node.close;
|
|
32
|
+
exports.connectIntegration = node.connectIntegration;
|
|
33
|
+
exports.consoleIntegration = node.consoleIntegration;
|
|
34
|
+
exports.contextLinesIntegration = node.contextLinesIntegration;
|
|
35
|
+
exports.continueTrace = node.continueTrace;
|
|
36
|
+
exports.createGetModuleFromFilename = node.createGetModuleFromFilename;
|
|
37
|
+
exports.createTransport = node.createTransport;
|
|
38
|
+
exports.cron = node.cron;
|
|
39
|
+
exports.debugIntegration = node.debugIntegration;
|
|
40
|
+
exports.dedupeIntegration = node.dedupeIntegration;
|
|
41
|
+
exports.defaultStackParser = node.defaultStackParser;
|
|
42
|
+
exports.endSession = node.endSession;
|
|
43
|
+
exports.expressErrorHandler = node.expressErrorHandler;
|
|
44
|
+
exports.expressIntegration = node.expressIntegration;
|
|
45
|
+
exports.extraErrorDataIntegration = node.extraErrorDataIntegration;
|
|
46
|
+
exports.extractRequestData = node.extractRequestData;
|
|
47
|
+
exports.fastifyIntegration = node.fastifyIntegration;
|
|
48
|
+
exports.flush = node.flush;
|
|
49
|
+
exports.functionToStringIntegration = node.functionToStringIntegration;
|
|
50
|
+
exports.generateInstrumentOnce = node.generateInstrumentOnce;
|
|
51
|
+
exports.getActiveSpan = node.getActiveSpan;
|
|
52
|
+
exports.getAutoPerformanceIntegrations = node.getAutoPerformanceIntegrations;
|
|
53
|
+
exports.getClient = node.getClient;
|
|
54
|
+
exports.getCurrentHub = node.getCurrentHub;
|
|
55
|
+
exports.getCurrentScope = node.getCurrentScope;
|
|
56
|
+
exports.getDefaultIntegrations = node.getDefaultIntegrations;
|
|
57
|
+
exports.getGlobalScope = node.getGlobalScope;
|
|
58
|
+
exports.getIsolationScope = node.getIsolationScope;
|
|
59
|
+
exports.getRootSpan = node.getRootSpan;
|
|
60
|
+
exports.getSentryRelease = node.getSentryRelease;
|
|
61
|
+
exports.getSpanDescendants = node.getSpanDescendants;
|
|
62
|
+
exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode;
|
|
63
|
+
exports.graphqlIntegration = node.graphqlIntegration;
|
|
64
|
+
exports.hapiIntegration = node.hapiIntegration;
|
|
65
|
+
exports.httpIntegration = node.httpIntegration;
|
|
66
|
+
exports.inboundFiltersIntegration = node.inboundFiltersIntegration;
|
|
67
|
+
exports.initOpenTelemetry = node.initOpenTelemetry;
|
|
68
|
+
exports.isInitialized = node.isInitialized;
|
|
69
|
+
exports.koaIntegration = node.koaIntegration;
|
|
70
|
+
exports.lastEventId = node.lastEventId;
|
|
71
|
+
exports.linkedErrorsIntegration = node.linkedErrorsIntegration;
|
|
72
|
+
exports.localVariablesIntegration = node.localVariablesIntegration;
|
|
73
|
+
exports.makeNodeTransport = node.makeNodeTransport;
|
|
74
|
+
exports.metrics = node.metrics;
|
|
75
|
+
exports.modulesIntegration = node.modulesIntegration;
|
|
76
|
+
exports.mongoIntegration = node.mongoIntegration;
|
|
77
|
+
exports.mongooseIntegration = node.mongooseIntegration;
|
|
78
|
+
exports.mysql2Integration = node.mysql2Integration;
|
|
79
|
+
exports.mysqlIntegration = node.mysqlIntegration;
|
|
80
|
+
exports.nativeNodeFetchIntegration = node.nativeNodeFetchIntegration;
|
|
81
|
+
exports.nestIntegration = node.nestIntegration;
|
|
82
|
+
exports.nodeContextIntegration = node.nodeContextIntegration;
|
|
83
|
+
exports.onUncaughtExceptionIntegration = node.onUncaughtExceptionIntegration;
|
|
84
|
+
exports.onUnhandledRejectionIntegration = node.onUnhandledRejectionIntegration;
|
|
85
|
+
exports.parameterize = node.parameterize;
|
|
86
|
+
exports.postgresIntegration = node.postgresIntegration;
|
|
87
|
+
exports.prismaIntegration = node.prismaIntegration;
|
|
88
|
+
exports.redisIntegration = node.redisIntegration;
|
|
89
|
+
exports.requestDataIntegration = node.requestDataIntegration;
|
|
90
|
+
exports.rewriteFramesIntegration = node.rewriteFramesIntegration;
|
|
91
|
+
exports.sessionTimingIntegration = node.sessionTimingIntegration;
|
|
92
|
+
exports.setContext = node.setContext;
|
|
93
|
+
exports.setCurrentClient = node.setCurrentClient;
|
|
94
|
+
exports.setExtra = node.setExtra;
|
|
95
|
+
exports.setExtras = node.setExtras;
|
|
96
|
+
exports.setHttpStatus = node.setHttpStatus;
|
|
97
|
+
exports.setMeasurement = node.setMeasurement;
|
|
98
|
+
exports.setTag = node.setTag;
|
|
99
|
+
exports.setTags = node.setTags;
|
|
100
|
+
exports.setUser = node.setUser;
|
|
101
|
+
exports.setupConnectErrorHandler = node.setupConnectErrorHandler;
|
|
102
|
+
exports.setupExpressErrorHandler = node.setupExpressErrorHandler;
|
|
103
|
+
exports.setupHapiErrorHandler = node.setupHapiErrorHandler;
|
|
104
|
+
exports.setupKoaErrorHandler = node.setupKoaErrorHandler;
|
|
105
|
+
exports.setupNestErrorHandler = node.setupNestErrorHandler;
|
|
106
|
+
exports.spanToBaggageHeader = node.spanToBaggageHeader;
|
|
107
|
+
exports.spanToJSON = node.spanToJSON;
|
|
108
|
+
exports.spanToTraceHeader = node.spanToTraceHeader;
|
|
109
|
+
exports.spotlightIntegration = node.spotlightIntegration;
|
|
110
|
+
exports.startInactiveSpan = node.startInactiveSpan;
|
|
111
|
+
exports.startNewTrace = node.startNewTrace;
|
|
112
|
+
exports.startSession = node.startSession;
|
|
113
|
+
exports.startSpan = node.startSpan;
|
|
114
|
+
exports.startSpanManual = node.startSpanManual;
|
|
115
|
+
exports.trpcMiddleware = node.trpcMiddleware;
|
|
116
|
+
exports.withActiveSpan = node.withActiveSpan;
|
|
117
|
+
exports.withIsolationScope = node.withIsolationScope;
|
|
118
|
+
exports.withMonitor = node.withMonitor;
|
|
119
|
+
exports.withScope = node.withScope;
|
|
120
|
+
exports.zodErrorsIntegration = node.zodErrorsIntegration;
|
|
121
|
+
exports.withSentryErrorBoundary = solid.withSentryErrorBoundary;
|
|
122
|
+
exports.init = sdk.init;
|
|
123
|
+
exports.withServerActionInstrumentation = withServerActionInstrumentation.withServerActionInstrumentation;
|
|
124
|
+
Object.prototype.hasOwnProperty.call(node, '__proto__') &&
|
|
125
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
126
|
+
Object.defineProperty(exports, '__proto__', {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
value: node['__proto__']
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
Object.keys(node).forEach(k => {
|
|
132
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
const node = require('@sentry/node');
|
|
5
|
+
const utils = require('./utils.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Initializes the server side of the Solid Start SDK
|
|
9
|
+
*/
|
|
10
|
+
function init(options) {
|
|
11
|
+
const opts = {
|
|
12
|
+
...options,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
core.applySdkMetadata(opts, 'solidstart', ['solidstart', 'node']);
|
|
16
|
+
utils.filterLowQualityTransactions(opts);
|
|
17
|
+
|
|
18
|
+
return node.init(opts);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
exports.init = init;
|
|
22
|
+
//# sourceMappingURL=sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { init as initNodeSdk } from '@sentry/node';\nimport { filterLowQualityTransactions } from './utils';\n\n/**\n * Initializes the server side of the Solid Start SDK\n */\nexport function init(options: NodeOptions): NodeClient | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'node']);\n filterLowQualityTransactions(opts);\n\n return initNodeSdk(opts);\n}\n"],"names":["applySdkMetadata","filterLowQualityTransactions","initNodeSdk"],"mappings":";;;;;;AAKA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAuC;AACnE,EAAE,MAAM,OAAO;AACf,IAAI,GAAG,OAAO;AACd,GAAG,CAAA;AACH;AACA,EAAEA,qBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;AAC9D,EAAEC,kCAA4B,CAAC,IAAI,CAAC,CAAA;AACpC;AACA,EAAE,OAAOC,SAAW,CAAC,IAAI,CAAC,CAAA;AAC1B;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const solidJs = require('solid-js');
|
|
4
|
+
const web = require('solid-js/web');
|
|
5
|
+
|
|
6
|
+
// We use @sentry/solid/solidrouter on the client.
|
|
7
|
+
// On the server, we have to create matching components
|
|
8
|
+
// in structure to avoid hydration errors.
|
|
9
|
+
|
|
10
|
+
/** Pass-through component in case user didn't specify a root **/
|
|
11
|
+
function SentryDefaultRoot(props) {
|
|
12
|
+
return props.children;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* On the client, router hooks are used in the router's root render prop.
|
|
17
|
+
* This creates a matching structure that's purely pass-through to avoid hydration errors.
|
|
18
|
+
*/
|
|
19
|
+
function withSentryRouterRoot(Root) {
|
|
20
|
+
const SentryRouterRoot = (props) => {
|
|
21
|
+
return web.createComponent(Root, props);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return SentryRouterRoot;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* On the client, router hooks are used to start navigation spans.
|
|
29
|
+
* This creates a matching structure that's purely pass-through to avoid hydration errors.
|
|
30
|
+
*/
|
|
31
|
+
function withSentryRouterRouting(Router) {
|
|
32
|
+
const SentryRouter = (props) => {
|
|
33
|
+
const [local, others] = solidJs.splitProps(props, ['root']);
|
|
34
|
+
// We need to wrap root here in case the user passed in their own root
|
|
35
|
+
const Root = withSentryRouterRoot(local.root ? local.root : SentryDefaultRoot);
|
|
36
|
+
|
|
37
|
+
return web.createComponent(Router, solidJs.mergeProps({ root: Root }, others));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return SentryRouter;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.withSentryRouterRouting = withSentryRouterRouting;
|
|
44
|
+
//# sourceMappingURL=solidrouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solidrouter.js","sources":["../../../src/server/solidrouter.ts"],"sourcesContent":["import type { HashRouter, MemoryRouter, RouteSectionProps, Router as BaseRouter, StaticRouter } from '@solidjs/router';\nimport { mergeProps, splitProps } from 'solid-js';\nimport type { Component, JSX, ParentProps } from 'solid-js';\nimport { createComponent } from 'solid-js/web';\n\n// We use @sentry/solid/solidrouter on the client.\n// On the server, we have to create matching components\n// in structure to avoid hydration errors.\n\n/** Pass-through component in case user didn't specify a root **/\nfunction SentryDefaultRoot(props: ParentProps): JSX.Element {\n return props.children;\n}\n\n/**\n * On the client, router hooks are used in the router's root render prop.\n * This creates a matching structure that's purely pass-through to avoid hydration errors.\n */\nfunction withSentryRouterRoot(Root: Component<RouteSectionProps>): Component<RouteSectionProps> {\n const SentryRouterRoot = (props: RouteSectionProps): JSX.Element => {\n return createComponent(Root, props);\n };\n\n return SentryRouterRoot;\n}\n\nexport type RouterType = typeof BaseRouter | typeof HashRouter | typeof MemoryRouter | typeof StaticRouter;\n\n/**\n * On the client, router hooks are used to start navigation spans.\n * This creates a matching structure that's purely pass-through to avoid hydration errors.\n */\nexport function withSentryRouterRouting(Router: RouterType): RouterType {\n const SentryRouter = (props: Parameters<RouterType>[0]): JSX.Element => {\n const [local, others] = splitProps(props, ['root']);\n // We need to wrap root here in case the user passed in their own root\n const Root = withSentryRouterRoot(local.root ? local.root : SentryDefaultRoot);\n\n return createComponent(Router, mergeProps({ root: Root }, others));\n };\n\n return SentryRouter;\n}\n"],"names":["createComponent","splitProps","mergeProps"],"mappings":";;;;;AAKA;AACA;AACA;AACA;AACA;AACA,SAAS,iBAAiB,CAAC,KAAK,EAA4B;AAC5D,EAAE,OAAO,KAAK,CAAC,QAAQ,CAAA;AACvB,CAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,oBAAoB,CAAC,IAAI,EAA8D;AAChG,EAAE,MAAM,gBAAA,GAAmB,CAAC,KAAK,KAAqC;AACtE,IAAI,OAAOA,mBAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACvC,GAAG,CAAA;AACH;AACA,EAAE,OAAO,gBAAgB,CAAA;AACzB,CAAA;;AAIA;AACA;AACA;AACA;AACO,SAAS,uBAAuB,CAAC,MAAM,EAA0B;AACxE,EAAE,MAAM,YAAA,GAAe,CAAC,KAAK,KAA6C;AAC1E,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,CAAE,GAAEC,kBAAU,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;AACvD;AACA,IAAI,MAAM,IAAA,GAAO,oBAAoB,CAAC,KAAK,CAAC,IAAK,GAAE,KAAK,CAAC,IAAK,GAAE,iBAAiB,CAAC,CAAA;AAClF;AACA,IAAI,OAAOD,mBAAe,CAAC,MAAM,EAAEE,kBAAU,CAAC,EAAE,IAAI,EAAE,IAAK,EAAC,EAAE,MAAM,CAAC,CAAC,CAAA;AACtE,GAAG,CAAA;AACH;AACA,EAAE,OAAO,YAAY,CAAA;AACrB;;;;"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var {
|
|
2
|
+
_optionalChain
|
|
3
|
+
} = require('@sentry/utils');
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
|
+
|
|
7
|
+
const node = require('@sentry/node');
|
|
8
|
+
const utils = require('@sentry/utils');
|
|
9
|
+
const debugBuild = require('../common/debug-build.js');
|
|
10
|
+
|
|
11
|
+
/** Flush the event queue to ensure that events get sent to Sentry before the response is finished and the lambda ends */
|
|
12
|
+
async function flushIfServerless() {
|
|
13
|
+
const isServerless = !!process.env.LAMBDA_TASK_ROOT || !!process.env.VERCEL;
|
|
14
|
+
|
|
15
|
+
if (isServerless) {
|
|
16
|
+
try {
|
|
17
|
+
debugBuild.DEBUG_BUILD && utils.logger.log('Flushing events...');
|
|
18
|
+
await node.flush(2000);
|
|
19
|
+
debugBuild.DEBUG_BUILD && utils.logger.log('Done flushing events');
|
|
20
|
+
} catch (e) {
|
|
21
|
+
debugBuild.DEBUG_BUILD && utils.logger.log('Error while flushing events:\n', e);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Determines if a thrown "error" is a redirect Response which Solid Start users can throw to redirect to another route.
|
|
28
|
+
* see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect
|
|
29
|
+
* @param error the potential redirect error
|
|
30
|
+
*/
|
|
31
|
+
function isRedirect(error) {
|
|
32
|
+
if (error == null || !(error instanceof Response)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const hasValidLocation = typeof error.headers.get('location') === 'string';
|
|
37
|
+
const hasValidStatus = error.status >= 300 && error.status <= 308;
|
|
38
|
+
return hasValidLocation && hasValidStatus;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Adds an event processor to filter out low quality transactions,
|
|
43
|
+
* e.g. to filter out transactions for build assets
|
|
44
|
+
*/
|
|
45
|
+
function filterLowQualityTransactions(options) {
|
|
46
|
+
node.getGlobalScope().addEventProcessor(
|
|
47
|
+
Object.assign(
|
|
48
|
+
(event => {
|
|
49
|
+
if (event.type !== 'transaction') {
|
|
50
|
+
return event;
|
|
51
|
+
}
|
|
52
|
+
// Filter out transactions for build assets
|
|
53
|
+
if (_optionalChain([event, 'access', _ => _.transaction, 'optionalAccess', _2 => _2.match, 'call', _3 => _3(/^GET \/_build\//)])) {
|
|
54
|
+
options.debug && utils.logger.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return event;
|
|
58
|
+
}) ,
|
|
59
|
+
{ id: 'SolidStartLowQualityTransactionsFilter' },
|
|
60
|
+
),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
exports.filterLowQualityTransactions = filterLowQualityTransactions;
|
|
65
|
+
exports.flushIfServerless = flushIfServerless;
|
|
66
|
+
exports.isRedirect = isRedirect;
|
|
67
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/server/utils.ts"],"sourcesContent":["import { flush, getGlobalScope } from '@sentry/node';\nimport type { EventProcessor, Options } from '@sentry/types';\nimport { logger } from '@sentry/utils';\nimport { DEBUG_BUILD } from '../common/debug-build';\n\n/** Flush the event queue to ensure that events get sent to Sentry before the response is finished and the lambda ends */\nexport async function flushIfServerless(): Promise<void> {\n const isServerless = !!process.env.LAMBDA_TASK_ROOT || !!process.env.VERCEL;\n\n if (isServerless) {\n try {\n DEBUG_BUILD && logger.log('Flushing events...');\n await flush(2000);\n DEBUG_BUILD && logger.log('Done flushing events');\n } catch (e) {\n DEBUG_BUILD && logger.log('Error while flushing events:\\n', e);\n }\n }\n}\n\n/**\n * Determines if a thrown \"error\" is a redirect Response which Solid Start users can throw to redirect to another route.\n * see: https://docs.solidjs.com/solid-router/reference/data-apis/response-helpers#redirect\n * @param error the potential redirect error\n */\nexport function isRedirect(error: unknown): boolean {\n if (error == null || !(error instanceof Response)) {\n return false;\n }\n\n const hasValidLocation = typeof error.headers.get('location') === 'string';\n const hasValidStatus = error.status >= 300 && error.status <= 308;\n return hasValidLocation && hasValidStatus;\n}\n\n/**\n * Adds an event processor to filter out low quality transactions,\n * e.g. to filter out transactions for build assets\n */\nexport function filterLowQualityTransactions(options: Options): void {\n getGlobalScope().addEventProcessor(\n Object.assign(\n (event => {\n if (event.type !== 'transaction') {\n return event;\n }\n // Filter out transactions for build assets\n if (event.transaction?.match(/^GET \\/_build\\//)) {\n options.debug && logger.log('SolidStartLowQualityTransactionsFilter filtered transaction', event.transaction);\n return null;\n }\n return event;\n }) satisfies EventProcessor,\n { id: 'SolidStartLowQualityTransactionsFilter' },\n ),\n );\n}\n"],"names":["DEBUG_BUILD","logger","flush","getGlobalScope"],"mappings":";;;;;;;;;;AAKA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CA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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA6D,EAAE,CAAA,CAAA,CAAA,CAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAC;UAC7G,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,IAAI;QACb;QACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,KAAK;MACb,CAAA,EAAA;MACD,EAAE,CAAA,CAAE,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA0C,CAAA;IACjD,CAAA;EACL,CAAG;AACH;;;;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
const node = require('@sentry/node');
|
|
5
|
+
const utils = require('./utils.js');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Wraps a server action (functions that use the 'use server' directive)
|
|
9
|
+
* function body with Sentry Error and Performance instrumentation.
|
|
10
|
+
*/
|
|
11
|
+
async function withServerActionInstrumentation(
|
|
12
|
+
serverActionName,
|
|
13
|
+
callback,
|
|
14
|
+
) {
|
|
15
|
+
const activeSpan = node.getActiveSpan();
|
|
16
|
+
|
|
17
|
+
if (activeSpan) {
|
|
18
|
+
const spanData = node.spanToJSON(activeSpan).data;
|
|
19
|
+
|
|
20
|
+
// In solid start, server function calls are made to `/_server` which doesn't tell us
|
|
21
|
+
// a lot. We rewrite the span's route to be that of the sever action name but only
|
|
22
|
+
// if the target is `/_server`, otherwise we'd overwrite pageloads on routes that use
|
|
23
|
+
// server actions (which are more meaningful, e.g. a request to `GET /users/5` is more
|
|
24
|
+
// meaningful than overwriting it with `GET doSomeFunctionCall`).
|
|
25
|
+
if (spanData && !spanData['http.route'] && spanData['http.target'] === '/_server') {
|
|
26
|
+
activeSpan.setAttribute('http.route', serverActionName);
|
|
27
|
+
activeSpan.setAttribute(node.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'component');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
return await node.startSpan(
|
|
33
|
+
{
|
|
34
|
+
op: 'function.server_action',
|
|
35
|
+
name: serverActionName,
|
|
36
|
+
attributes: {
|
|
37
|
+
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.solidstart',
|
|
38
|
+
[node.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
async span => {
|
|
42
|
+
const result = await core.handleCallbackErrors(callback, error => {
|
|
43
|
+
if (!utils.isRedirect(error)) {
|
|
44
|
+
span.setStatus({ code: core.SPAN_STATUS_ERROR, message: 'internal_error' });
|
|
45
|
+
node.captureException(error, {
|
|
46
|
+
mechanism: {
|
|
47
|
+
handled: false,
|
|
48
|
+
type: 'solidstart',
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return result;
|
|
55
|
+
},
|
|
56
|
+
);
|
|
57
|
+
} finally {
|
|
58
|
+
await utils.flushIfServerless();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
exports.withServerActionInstrumentation = withServerActionInstrumentation;
|
|
63
|
+
//# sourceMappingURL=withServerActionInstrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withServerActionInstrumentation.js","sources":["../../../src/server/withServerActionInstrumentation.ts"],"sourcesContent":["import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_STATUS_ERROR, handleCallbackErrors } from '@sentry/core';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, captureException, getActiveSpan, spanToJSON, startSpan } from '@sentry/node';\nimport { flushIfServerless, isRedirect } from './utils';\n\n/**\n * Wraps a server action (functions that use the 'use server' directive)\n * function body with Sentry Error and Performance instrumentation.\n */\nexport async function withServerActionInstrumentation<A extends (...args: unknown[]) => unknown>(\n serverActionName: string,\n callback: A,\n): Promise<ReturnType<A>> {\n const activeSpan = getActiveSpan();\n\n if (activeSpan) {\n const spanData = spanToJSON(activeSpan).data;\n\n // In solid start, server function calls are made to `/_server` which doesn't tell us\n // a lot. We rewrite the span's route to be that of the sever action name but only\n // if the target is `/_server`, otherwise we'd overwrite pageloads on routes that use\n // server actions (which are more meaningful, e.g. a request to `GET /users/5` is more\n // meaningful than overwriting it with `GET doSomeFunctionCall`).\n if (spanData && !spanData['http.route'] && spanData['http.target'] === '/_server') {\n activeSpan.setAttribute('http.route', serverActionName);\n activeSpan.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'component');\n }\n }\n\n try {\n return await startSpan(\n {\n op: 'function.server_action',\n name: serverActionName,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.solidstart',\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',\n },\n },\n async span => {\n const result = await handleCallbackErrors(callback, error => {\n if (!isRedirect(error)) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n captureException(error, {\n mechanism: {\n handled: false,\n type: 'solidstart',\n },\n });\n }\n });\n\n return result;\n },\n );\n } finally {\n await flushIfServerless();\n }\n}\n"],"names":["getActiveSpan","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","startSpan","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","handleCallbackErrors","isRedirect","SPAN_STATUS_ERROR","captureException","flushIfServerless"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACO,eAAe,+BAA+B;AACrD,EAAE,gBAAgB;AAClB,EAAE,QAAQ;AACV,EAA0B;AAC1B,EAAE,MAAM,UAAA,GAAaA,kBAAa,EAAE,CAAA;AACpC;AACA,EAAE,IAAI,UAAU,EAAE;AAClB,IAAI,MAAM,WAAWC,eAAU,CAAC,UAAU,CAAC,CAAC,IAAI,CAAA;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,QAAA,IAAY,CAAC,QAAQ,CAAC,YAAY,CAAE,IAAG,QAAQ,CAAC,aAAa,CAAE,KAAI,UAAU,EAAE;AACvF,MAAM,UAAU,CAAC,YAAY,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAA;AAC7D,MAAM,UAAU,CAAC,YAAY,CAACC,qCAAgC,EAAE,WAAW,CAAC,CAAA;AAC5E,KAAI;AACJ,GAAE;AACF;AACA,EAAE,IAAI;AACN,IAAI,OAAO,MAAMC,cAAS;AAC1B,MAAM;AACN,QAAQ,EAAE,EAAE,wBAAwB;AACpC,QAAQ,IAAI,EAAE,gBAAgB;AAC9B,QAAQ,UAAU,EAAE;AACpB,UAAU,CAACC,qCAAgC,GAAG,0BAA0B;AACxE,UAAU,CAACF,qCAAgC,GAAG,WAAW;AACzD,SAAS;AACT,OAAO;AACP,MAAM,MAAM,QAAQ;AACpB,QAAQ,MAAM,SAAS,MAAMG,yBAAoB,CAAC,QAAQ,EAAE,KAAA,IAAS;AACrE,UAAU,IAAI,CAACC,gBAAU,CAAC,KAAK,CAAC,EAAE;AAClC,YAAY,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAEC,sBAAiB,EAAE,OAAO,EAAE,gBAAA,EAAkB,CAAC,CAAA;AAClF,YAAYC,qBAAgB,CAAC,KAAK,EAAE;AACpC,cAAc,SAAS,EAAE;AACzB,gBAAgB,OAAO,EAAE,KAAK;AAC9B,gBAAgB,IAAI,EAAE,YAAY;AAClC,eAAe;AACf,aAAa,CAAC,CAAA;AACd,WAAU;AACV,SAAS,CAAC,CAAA;AACV;AACA,QAAQ,OAAO,MAAM,CAAA;AACrB,OAAO;AACP,KAAK,CAAA;AACL,YAAY;AACZ,IAAI,MAAMC,uBAAiB,EAAE,CAAA;AAC7B,GAAE;AACF;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const solidrouter = require('@sentry/solid/solidrouter');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.prototype.hasOwnProperty.call(solidrouter, '__proto__') &&
|
|
8
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
9
|
+
Object.defineProperty(exports, '__proto__', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
value: solidrouter['__proto__']
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
Object.keys(solidrouter).forEach(k => {
|
|
15
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solidrouter[k];
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=solidrouter.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solidrouter.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
|
|
3
|
+
const solidrouter = require('@sentry/solid/solidrouter');
|
|
4
|
+
const solidrouter$1 = require('./server/solidrouter.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
exports.withSentryRouterRouting = solidrouter$1.withSentryRouterRouting;
|
|
9
|
+
Object.prototype.hasOwnProperty.call(solidrouter, '__proto__') &&
|
|
10
|
+
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
11
|
+
Object.defineProperty(exports, '__proto__', {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
value: solidrouter['__proto__']
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
Object.keys(solidrouter).forEach(k => {
|
|
17
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = solidrouter[k];
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=solidrouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solidrouter.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solidrouter.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { applySdkMetadata } from '@sentry/core';
|
|
2
|
+
import { init as init$1 } from '@sentry/solid';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Initializes the client side of the Solid Start SDK.
|
|
6
|
+
*/
|
|
7
|
+
function init(options) {
|
|
8
|
+
const opts = {
|
|
9
|
+
...options,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);
|
|
13
|
+
|
|
14
|
+
return init$1(opts);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { init };
|
|
18
|
+
//# sourceMappingURL=sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/client/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/solid';\nimport { init as initSolidSDK } from '@sentry/solid';\nimport type { Client } from '@sentry/types';\n\n/**\n * Initializes the client side of the Solid Start SDK.\n */\nexport function init(options: BrowserOptions): Client | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']);\n\n return initSolidSDK(opts);\n}\n"],"names":["initSolidSDK"],"mappings":";;;AAKA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAsC;AAClE,EAAE,MAAM,OAAO;AACf,IAAI,GAAG,OAAO;AACd,GAAG,CAAA;AACH;AACA,EAAE,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAA;AAC/D;AACA,EAAE,OAAOA,MAAY,CAAC,IAAI,CAAC,CAAA;AAC3B;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"solidrouter.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.
|
|
3
|
+
*
|
|
4
|
+
* ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
|
|
5
|
+
*/
|
|
6
|
+
const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__);
|
|
7
|
+
|
|
8
|
+
export { DEBUG_BUILD };
|
|
9
|
+
//# sourceMappingURL=debug-build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-build.js","sources":["../../../src/common/debug-build.ts"],"sourcesContent":["declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n"],"names":[],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,WAAY,IAAE,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from '@sentry/node';
|
|
2
|
+
export { DEFAULT_USER_INCLUDES, NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, addOpenTelemetryInstrumentation, addRequestDataToEvent, anrIntegration, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, connectIntegration, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, debugIntegration, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, extractRequestData, fastifyIntegration, flush, functionToStringIntegration, generateInstrumentOnce, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, isInitialized, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, metrics, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nestIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setupNestErrorHandler, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, trpcMiddleware, withActiveSpan, withIsolationScope, withMonitor, withScope, zodErrorsIntegration } from '@sentry/node';
|
|
3
|
+
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
|
+
export { init } from './server/sdk.js';
|
|
5
|
+
export { withServerActionInstrumentation } from './server/withServerActionInstrumentation.js';
|
|
6
|
+
//# sourceMappingURL=index.server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { getTraceMetaTags } from '@sentry/core';
|
|
2
|
+
import { addNonEnumerableProperty } from '@sentry/utils';
|
|
3
|
+
|
|
4
|
+
function addMetaTagToHead(html) {
|
|
5
|
+
const metaTags = getTraceMetaTags();
|
|
6
|
+
|
|
7
|
+
if (!metaTags) {
|
|
8
|
+
return html;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const content = `<head>\n${metaTags}\n`;
|
|
12
|
+
return html.replace('<head>', content);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Returns an `onBeforeResponse` solid start middleware handler that adds tracing data as
|
|
17
|
+
* <meta> tags to a page on pageload to enable distributed tracing.
|
|
18
|
+
*/
|
|
19
|
+
function sentryBeforeResponseMiddleware() {
|
|
20
|
+
return async function onBeforeResponse(event, response) {
|
|
21
|
+
if (!response.body || response.__sentry_wrapped__) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Ensure we don't double-wrap, in case a user has added the middleware twice
|
|
26
|
+
// e.g. once manually, once via the wizard
|
|
27
|
+
addNonEnumerableProperty(response, '__sentry_wrapped__', true);
|
|
28
|
+
|
|
29
|
+
const contentType = event.response.headers.get('content-type');
|
|
30
|
+
const isPageloadRequest = contentType && contentType.startsWith('text/html');
|
|
31
|
+
|
|
32
|
+
if (!isPageloadRequest) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const body = response.body ;
|
|
37
|
+
const decoder = new TextDecoder();
|
|
38
|
+
response.body = new ReadableStream({
|
|
39
|
+
start: async controller => {
|
|
40
|
+
for await (const chunk of body) {
|
|
41
|
+
const html = typeof chunk === 'string' ? chunk : decoder.decode(chunk, { stream: true });
|
|
42
|
+
const modifiedHtml = addMetaTagToHead(html);
|
|
43
|
+
controller.enqueue(new TextEncoder().encode(modifiedHtml));
|
|
44
|
+
}
|
|
45
|
+
controller.close();
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { sentryBeforeResponseMiddleware };
|
|
52
|
+
//# sourceMappingURL=middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","sources":["../../src/middleware.ts"],"sourcesContent":["import { getTraceMetaTags } from '@sentry/core';\nimport { addNonEnumerableProperty } from '@sentry/utils';\nimport type { ResponseMiddleware } from '@solidjs/start/middleware';\nimport type { FetchEvent } from '@solidjs/start/server';\n\nexport type ResponseMiddlewareResponse = Parameters<ResponseMiddleware>[1] & {\n __sentry_wrapped__?: boolean;\n};\n\nfunction addMetaTagToHead(html: string): string {\n const metaTags = getTraceMetaTags();\n\n if (!metaTags) {\n return html;\n }\n\n const content = `<head>\\n${metaTags}\\n`;\n return html.replace('<head>', content);\n}\n\n/**\n * Returns an `onBeforeResponse` solid start middleware handler that adds tracing data as\n * <meta> tags to a page on pageload to enable distributed tracing.\n */\nexport function sentryBeforeResponseMiddleware() {\n return async function onBeforeResponse(event: FetchEvent, response: ResponseMiddlewareResponse) {\n if (!response.body || response.__sentry_wrapped__) {\n return;\n }\n\n // Ensure we don't double-wrap, in case a user has added the middleware twice\n // e.g. once manually, once via the wizard\n addNonEnumerableProperty(response, '__sentry_wrapped__', true);\n\n const contentType = event.response.headers.get('content-type');\n const isPageloadRequest = contentType && contentType.startsWith('text/html');\n\n if (!isPageloadRequest) {\n return;\n }\n\n const body = response.body as NodeJS.ReadableStream;\n const decoder = new TextDecoder();\n response.body = new ReadableStream({\n start: async controller => {\n for await (const chunk of body) {\n const html = typeof chunk === 'string' ? chunk : decoder.decode(chunk, { stream: true });\n const modifiedHtml = addMetaTagToHead(html);\n controller.enqueue(new TextEncoder().encode(modifiedHtml));\n }\n controller.close();\n },\n });\n };\n}\n"],"names":[],"mappings":";;;AASA,SAAS,gBAAgB,CAAC,IAAI,EAAkB;AAChD,EAAE,MAAM,QAAA,GAAW,gBAAgB,EAAE,CAAA;AACrC;AACA,EAAE,IAAI,CAAC,QAAQ,EAAE;AACjB,IAAI,OAAO,IAAI,CAAA;AACf,GAAE;AACF;AACA,EAAE,MAAM,UAAU,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAA;AACzC,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;AACxC,CAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,8BAA8B,GAAG;AACjD,EAAE,OAAO,eAAe,gBAAgB,CAAC,KAAK,EAAc,QAAQ,EAA8B;AAClG,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,QAAQ,CAAC,kBAAkB,EAAE;AACvD,MAAM,OAAM;AACZ,KAAI;AACJ;AACA;AACA;AACA,IAAI,wBAAwB,CAAC,QAAQ,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAA;AAClE;AACA,IAAI,MAAM,WAAA,GAAc,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;AAClE,IAAI,MAAM,iBAAkB,GAAE,WAAY,IAAG,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;AAChF;AACA,IAAI,IAAI,CAAC,iBAAiB,EAAE;AAC5B,MAAM,OAAM;AACZ,KAAI;AACJ;AACA,IAAI,MAAM,IAAA,GAAO,QAAQ,CAAC,IAAK,EAAA;AAC/B,IAAI,MAAM,OAAQ,GAAE,IAAI,WAAW,EAAE,CAAA;AACrC,IAAI,QAAQ,CAAC,IAAA,GAAO,IAAI,cAAc,CAAC;AACvC,MAAM,KAAK,EAAE,MAAM,UAAA,IAAc;AACjC,QAAQ,WAAW,MAAM,KAAM,IAAG,IAAI,EAAE;AACxC,UAAU,MAAM,OAAO,OAAO,UAAU,QAAA,GAAW,KAAM,GAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAK,EAAC,CAAC,CAAA;AAClG,UAAU,MAAM,YAAa,GAAE,gBAAgB,CAAC,IAAI,CAAC,CAAA;AACrD,UAAU,UAAU,CAAC,OAAO,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAA;AACpE,SAAQ;AACR,QAAQ,UAAU,CAAC,KAAK,EAAE,CAAA;AAC1B,OAAO;AACP,KAAK,CAAC,CAAA;AACN,GAAG,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from '@sentry/node';
|
|
2
|
+
export { DEFAULT_USER_INCLUDES, NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, addOpenTelemetryInstrumentation, addRequestDataToEvent, anrIntegration, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, close, connectIntegration, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, cron, debugIntegration, dedupeIntegration, defaultStackParser, endSession, expressErrorHandler, expressIntegration, extraErrorDataIntegration, extractRequestData, fastifyIntegration, flush, functionToStringIntegration, generateInstrumentOnce, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, isInitialized, koaIntegration, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeNodeTransport, metrics, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nestIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, postgresIntegration, prismaIntegration, redisIntegration, requestDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, setupNestErrorHandler, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, trpcMiddleware, withActiveSpan, withIsolationScope, withMonitor, withScope, zodErrorsIntegration } from '@sentry/node';
|
|
3
|
+
export { withSentryErrorBoundary } from '@sentry/solid';
|
|
4
|
+
export { init } from './sdk.js';
|
|
5
|
+
export { withServerActionInstrumentation } from './withServerActionInstrumentation.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { applySdkMetadata } from '@sentry/core';
|
|
2
|
+
import { init as init$1 } from '@sentry/node';
|
|
3
|
+
import { filterLowQualityTransactions } from './utils.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Initializes the server side of the Solid Start SDK
|
|
7
|
+
*/
|
|
8
|
+
function init(options) {
|
|
9
|
+
const opts = {
|
|
10
|
+
...options,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
applySdkMetadata(opts, 'solidstart', ['solidstart', 'node']);
|
|
14
|
+
filterLowQualityTransactions(opts);
|
|
15
|
+
|
|
16
|
+
return init$1(opts);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { init };
|
|
20
|
+
//# sourceMappingURL=sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.js","sources":["../../../src/server/sdk.ts"],"sourcesContent":["import { applySdkMetadata } from '@sentry/core';\nimport type { NodeClient, NodeOptions } from '@sentry/node';\nimport { init as initNodeSdk } from '@sentry/node';\nimport { filterLowQualityTransactions } from './utils';\n\n/**\n * Initializes the server side of the Solid Start SDK\n */\nexport function init(options: NodeOptions): NodeClient | undefined {\n const opts = {\n ...options,\n };\n\n applySdkMetadata(opts, 'solidstart', ['solidstart', 'node']);\n filterLowQualityTransactions(opts);\n\n return initNodeSdk(opts);\n}\n"],"names":["initNodeSdk"],"mappings":";;;;AAKA;AACA;AACA;AACO,SAAS,IAAI,CAAC,OAAO,EAAuC;AACnE,EAAE,MAAM,OAAO;AACf,IAAI,GAAG,OAAO;AACd,GAAG,CAAA;AACH;AACA,EAAE,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAA;AAC9D,EAAE,4BAA4B,CAAC,IAAI,CAAC,CAAA;AACpC;AACA,EAAE,OAAOA,MAAW,CAAC,IAAI,CAAC,CAAA;AAC1B;;;;"}
|