@sentry/node 10.14.0 → 10.16.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/build/cjs/index.js +18 -15
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/firebase.js +1 -1
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js +1 -1
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/constants.js +15 -0
- package/build/cjs/integrations/tracing/hono/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/hono/index.js +137 -0
- package/build/cjs/integrations/tracing/hono/index.js.map +1 -0
- package/build/cjs/integrations/tracing/hono/instrumentation.js +236 -0
- package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/index.js +15 -12
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/utils/redisCache.js +2 -2
- package/build/cjs/utils/redisCache.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +1 -1
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/firebase.js +1 -1
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/google-genai/instrumentation.js +1 -1
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/hono/constants.js +12 -0
- package/build/esm/integrations/tracing/hono/constants.js.map +1 -0
- package/build/esm/integrations/tracing/hono/index.js +133 -0
- package/build/esm/integrations/tracing/hono/index.js.map +1 -0
- package/build/esm/integrations/tracing/hono/instrumentation.js +234 -0
- package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/index.js +3 -0
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/utils/redisCache.js +2 -2
- package/build/esm/utils/redisCache.js.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
- package/build/types/integrations/tracing/hono/constants.d.ts +11 -0
- package/build/types/integrations/tracing/hono/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/hono/index.d.ts +30 -0
- package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hono/instrumentation.d.ts +29 -2
- package/build/types/integrations/tracing/hono/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/hono/types.d.ts +4 -1
- package/build/types/integrations/tracing/hono/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +1 -0
- package/build/types-ts3.8/integrations/tracing/hono/constants.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +30 -0
- package/build/types-ts3.8/integrations/tracing/hono/instrumentation.d.ts +29 -2
- package/build/types-ts3.8/integrations/tracing/hono/types.d.ts +4 -1
- package/package.json +4 -4
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import { Span } from '@opentelemetry/api';
|
|
2
|
+
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
1
3
|
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
4
|
+
export interface HonoResponseHookFunction {
|
|
5
|
+
(span: Span): void;
|
|
6
|
+
}
|
|
7
|
+
export interface HonoInstrumentationConfig extends InstrumentationConfig {
|
|
8
|
+
/** Function for adding custom span attributes from the response */
|
|
9
|
+
responseHook?: HonoResponseHookFunction;
|
|
10
|
+
}
|
|
2
11
|
/**
|
|
3
12
|
* Hono instrumentation for OpenTelemetry
|
|
4
13
|
*/
|
|
5
|
-
export declare class HonoInstrumentation extends InstrumentationBase {
|
|
6
|
-
constructor();
|
|
14
|
+
export declare class HonoInstrumentation extends InstrumentationBase<HonoInstrumentationConfig> {
|
|
15
|
+
constructor(config?: HonoInstrumentationConfig);
|
|
7
16
|
/**
|
|
8
17
|
* Initialize the instrumentation.
|
|
9
18
|
*/
|
|
@@ -24,5 +33,23 @@ export declare class HonoInstrumentation extends InstrumentationBase {
|
|
|
24
33
|
* Patches the middleware handler to instrument it.
|
|
25
34
|
*/
|
|
26
35
|
private _patchMiddlewareHandler;
|
|
36
|
+
/**
|
|
37
|
+
* Wraps a handler or middleware handler to apply instrumentation.
|
|
38
|
+
*/
|
|
39
|
+
private _wrapHandler;
|
|
40
|
+
/**
|
|
41
|
+
* Safely executes a function and handles errors.
|
|
42
|
+
*/
|
|
43
|
+
private _safeExecute;
|
|
44
|
+
/**
|
|
45
|
+
* Determines the handler type based on the result.
|
|
46
|
+
* @param result
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
private _determineHandlerType;
|
|
50
|
+
/**
|
|
51
|
+
* Handles errors by setting the span status and recording the exception.
|
|
52
|
+
*/
|
|
53
|
+
private _handleError;
|
|
27
54
|
}
|
|
28
55
|
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export type HonoRequest = {
|
|
2
2
|
path: string;
|
|
3
|
+
method: string;
|
|
3
4
|
};
|
|
4
5
|
export type Context = {
|
|
5
6
|
req: HonoRequest;
|
|
7
|
+
res: Response;
|
|
8
|
+
error: Error | undefined;
|
|
6
9
|
};
|
|
7
10
|
export type Next = () => Promise<void>;
|
|
8
11
|
export type Handler = (c: Context, next: Next) => Promise<Response> | Response;
|
|
9
|
-
export type MiddlewareHandler = (c: Context, next: Next) => Promise<Response | void
|
|
12
|
+
export type MiddlewareHandler = (c: Context, next: Next) => Promise<Response | void>;
|
|
10
13
|
export type HandlerInterface = {
|
|
11
14
|
(...handlers: (Handler | MiddlewareHandler)[]): HonoInstance;
|
|
12
15
|
(path: string, ...handlers: (Handler | MiddlewareHandler)[]): HonoInstance;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.16.0",
|
|
4
4
|
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"@opentelemetry/sdk-trace-base": "^2.1.0",
|
|
96
96
|
"@opentelemetry/semantic-conventions": "^1.37.0",
|
|
97
97
|
"@prisma/instrumentation": "6.15.0",
|
|
98
|
-
"@sentry/core": "10.
|
|
99
|
-
"@sentry/node-core": "10.
|
|
100
|
-
"@sentry/opentelemetry": "10.
|
|
98
|
+
"@sentry/core": "10.16.0",
|
|
99
|
+
"@sentry/node-core": "10.16.0",
|
|
100
|
+
"@sentry/opentelemetry": "10.16.0",
|
|
101
101
|
"import-in-the-middle": "^1.14.2",
|
|
102
102
|
"minimatch": "^9.0.0"
|
|
103
103
|
},
|