@sentry/google-cloud-serverless 8.0.0-alpha.4
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 +14 -0
- package/README.md +47 -0
- package/cjs/debug-build.js +11 -0
- package/cjs/debug-build.js.map +1 -0
- package/cjs/gcpfunction/cloud_events.js +82 -0
- package/cjs/gcpfunction/cloud_events.js.map +1 -0
- package/cjs/gcpfunction/events.js +87 -0
- package/cjs/gcpfunction/events.js.map +1 -0
- package/cjs/gcpfunction/http.js +98 -0
- package/cjs/gcpfunction/http.js.map +1 -0
- package/cjs/index.js +115 -0
- package/cjs/index.js.map +1 -0
- package/cjs/integrations/google-cloud-grpc.js +114 -0
- package/cjs/integrations/google-cloud-grpc.js.map +1 -0
- package/cjs/integrations/google-cloud-http.js +65 -0
- package/cjs/integrations/google-cloud-http.js.map +1 -0
- package/cjs/sdk.js +42 -0
- package/cjs/sdk.js.map +1 -0
- package/cjs/utils.js +60 -0
- package/cjs/utils.js.map +1 -0
- package/esm/debug-build.js +9 -0
- package/esm/debug-build.js.map +1 -0
- package/esm/gcpfunction/cloud_events.js +80 -0
- package/esm/gcpfunction/cloud_events.js.map +1 -0
- package/esm/gcpfunction/events.js +85 -0
- package/esm/gcpfunction/events.js.map +1 -0
- package/esm/gcpfunction/http.js +93 -0
- package/esm/gcpfunction/http.js.map +1 -0
- package/esm/index.js +9 -0
- package/esm/index.js.map +1 -0
- package/esm/integrations/google-cloud-grpc.js +109 -0
- package/esm/integrations/google-cloud-grpc.js.map +1 -0
- package/esm/integrations/google-cloud-http.js +63 -0
- package/esm/integrations/google-cloud-http.js.map +1 -0
- package/esm/package.json +1 -0
- package/esm/sdk.js +39 -0
- package/esm/sdk.js.map +1 -0
- package/esm/utils.js +56 -0
- package/esm/utils.js.map +1 -0
- package/package.json +58 -0
- package/types/debug-build.d.ts +7 -0
- package/types/debug-build.d.ts.map +1 -0
- package/types/gcpfunction/cloud_events.d.ts +11 -0
- package/types/gcpfunction/cloud_events.d.ts.map +1 -0
- package/types/gcpfunction/events.d.ts +11 -0
- package/types/gcpfunction/events.d.ts.map +1 -0
- package/types/gcpfunction/general.d.ts +38 -0
- package/types/gcpfunction/general.d.ts.map +1 -0
- package/types/gcpfunction/http.d.ts +10 -0
- package/types/gcpfunction/http.d.ts.map +1 -0
- package/types/index.d.ts +9 -0
- package/types/index.d.ts.map +1 -0
- package/types/integrations/google-cloud-grpc.d.ts +7 -0
- package/types/integrations/google-cloud-grpc.d.ts.map +1 -0
- package/types/integrations/google-cloud-http.d.ts +7 -0
- package/types/integrations/google-cloud-http.d.ts.map +1 -0
- package/types/sdk.d.ts +9 -0
- package/types/sdk.d.ts.map +1 -0
- package/types/utils.d.ts +18 -0
- package/types/utils.d.ts.map +1 -0
- package/types-ts3.8/debug-build.d.ts +7 -0
- package/types-ts3.8/gcpfunction/cloud_events.d.ts +11 -0
- package/types-ts3.8/gcpfunction/events.d.ts +11 -0
- package/types-ts3.8/gcpfunction/general.d.ts +38 -0
- package/types-ts3.8/gcpfunction/http.d.ts +10 -0
- package/types-ts3.8/index.d.ts +9 -0
- package/types-ts3.8/integrations/google-cloud-grpc.d.ts +7 -0
- package/types-ts3.8/integrations/google-cloud-http.d.ts +7 -0
- package/types-ts3.8/sdk.d.ts +9 -0
- package/types-ts3.8/utils.d.ts +18 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Request, Response } from 'express';
|
|
2
|
+
export interface HttpFunction {
|
|
3
|
+
(req: Request, res: Response): any;
|
|
4
|
+
}
|
|
5
|
+
export interface EventFunction {
|
|
6
|
+
(data: Record<string, any>, context: Context): any;
|
|
7
|
+
}
|
|
8
|
+
export interface EventFunctionWithCallback {
|
|
9
|
+
(data: Record<string, any>, context: Context, callback: Function): any;
|
|
10
|
+
}
|
|
11
|
+
export interface CloudEventFunction {
|
|
12
|
+
(cloudevent: CloudEventsContext): any;
|
|
13
|
+
}
|
|
14
|
+
export interface CloudEventFunctionWithCallback {
|
|
15
|
+
(cloudevent: CloudEventsContext, callback: Function): any;
|
|
16
|
+
}
|
|
17
|
+
export interface CloudFunctionsContext {
|
|
18
|
+
eventId?: string;
|
|
19
|
+
timestamp?: string;
|
|
20
|
+
eventType?: string;
|
|
21
|
+
resource?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface CloudEventsContext {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
type?: string;
|
|
26
|
+
specversion?: string;
|
|
27
|
+
source?: string;
|
|
28
|
+
id?: string;
|
|
29
|
+
time?: string;
|
|
30
|
+
schemaurl?: string;
|
|
31
|
+
contenttype?: string;
|
|
32
|
+
}
|
|
33
|
+
export type Context = CloudFunctionsContext | CloudEventsContext;
|
|
34
|
+
export interface WrapperOptions {
|
|
35
|
+
flushTimeout: number;
|
|
36
|
+
}
|
|
37
|
+
export { Request, Response };
|
|
38
|
+
//# sourceMappingURL=general.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HttpFunction, WrapperOptions } from './general';
|
|
2
|
+
/**
|
|
3
|
+
* Wraps an HTTP function handler adding it error capture and tracing capabilities.
|
|
4
|
+
*
|
|
5
|
+
* @param fn HTTP Handler
|
|
6
|
+
* @param options Options
|
|
7
|
+
* @returns HTTP handler
|
|
8
|
+
*/
|
|
9
|
+
export declare function wrapHttpFunction(fn: HttpFunction, wrapOptions?: Partial<WrapperOptions>): HttpFunction;
|
|
10
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureCheckIn, startSession, captureSession, endSession, withMonitor, createTransport, getCurrentHub, getClient, isInitialized, getCurrentScope, getGlobalScope, getIsolationScope, Hub, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, makeNodeTransport, NodeClient, defaultStackParser, flush, close, getSentryRelease, addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData, createGetModuleFromFilename, anrIntegration, consoleIntegration, httpIntegration, nativeNodeFetchIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, setMeasurement, getActiveSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, getRootSpan, getSpanDescendants, continueTrace, getAutoPerformanceIntegrations, cron, metrics, parameterize, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, expressIntegration, expressErrorHandler, setupExpressErrorHandler, fastifyIntegration, graphqlIntegration, mongoIntegration, mongooseIntegration, mysqlIntegration, mysql2Integration, nestIntegration, postgresIntegration, prismaIntegration, hapiIntegration, setupHapiErrorHandler, spotlightIntegration, } from '@sentry/node';
|
|
2
|
+
export { captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, } from '@sentry/core';
|
|
3
|
+
export { getDefaultIntegrations, init } from './sdk';
|
|
4
|
+
export { googleCloudHttpIntegration } from './integrations/google-cloud-http';
|
|
5
|
+
export { googleCloudGrpcIntegration } from './integrations/google-cloud-grpc';
|
|
6
|
+
export { wrapCloudEventFunction } from './gcpfunction/cloud_events';
|
|
7
|
+
export { wrapHttpFunction } from './gcpfunction/http';
|
|
8
|
+
export { wrapEventFunction } from './gcpfunction/events';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Cloud Platform service requests tracking for GRPC APIs.
|
|
3
|
+
*/
|
|
4
|
+
export declare const googleCloudGrpcIntegration: (options?: {
|
|
5
|
+
optional?: boolean | undefined;
|
|
6
|
+
} | undefined) => import("@sentry/types").IntegrationFnResult;
|
|
7
|
+
//# sourceMappingURL=google-cloud-grpc.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Cloud Platform service requests tracking for RESTful APIs.
|
|
3
|
+
*/
|
|
4
|
+
export declare const googleCloudHttpIntegration: (options?: {
|
|
5
|
+
optional?: boolean | undefined;
|
|
6
|
+
} | undefined) => import("@sentry/types").IntegrationFnResult;
|
|
7
|
+
//# sourceMappingURL=google-cloud-http.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NodeOptions } from '@sentry/node';
|
|
2
|
+
import { Integration, Options } from '@sentry/types';
|
|
3
|
+
/** Get the default integrations for the GCP SDK. */
|
|
4
|
+
export declare function getDefaultIntegrations(options: Options): Integration[];
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link Sentry.init}
|
|
7
|
+
*/
|
|
8
|
+
export declare function init(options?: NodeOptions): void;
|
|
9
|
+
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Scope } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* @param fn function to run
|
|
4
|
+
* @returns function which runs in the newly created domain or in the existing one
|
|
5
|
+
*/
|
|
6
|
+
export declare function domainify<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R | void;
|
|
7
|
+
/**
|
|
8
|
+
* @param source function to be wrapped
|
|
9
|
+
* @param wrap wrapping function that takes source and returns a wrapper
|
|
10
|
+
* @param overrides properties to override in the source
|
|
11
|
+
* @returns wrapped function
|
|
12
|
+
*/
|
|
13
|
+
export declare function proxyFunction<A extends any[], R, F extends (...args: A) => R>(source: F, wrap: (source: F) => F, overrides?: Record<PropertyKey, unknown>): F;
|
|
14
|
+
/**
|
|
15
|
+
* Marks an event as unhandled by adding a span processor to the passed scope.
|
|
16
|
+
*/
|
|
17
|
+
export declare function markEventUnhandled(scope: Scope): Scope;
|
|
18
|
+
//# sourceMappingURL=utils.d.ts.map
|